Examples of CTPath2DCubicBezierTo


Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPath2DCubicBezierTo

                    ln.setX(Units.toEMU(vals[0]) - x0);
                    ln.setY(Units.toEMU(vals[1]) - y0);
                    numPoints++;
                    break;
                case PathIterator.SEG_CUBICTO:
                    CTPath2DCubicBezierTo bez = ctPath.addNewCubicBezTo();
                    CTAdjPoint2D p1 = bez.addNewPt();
                    p1.setX(Units.toEMU(vals[0]) - x0);
                    p1.setY(Units.toEMU(vals[1]) - y0);
                    CTAdjPoint2D p2 = bez.addNewPt();
                    p2.setX(Units.toEMU(vals[2]) - x0);
                    p2.setY(Units.toEMU(vals[3]) - y0);
                    CTAdjPoint2D p3 = bez.addNewPt();
                    p3.setX(Units.toEMU(vals[4]) - x0);
                    p3.setY(Units.toEMU(vals[5]) - y0);
                    numPoints += 3;
                    break;
                case PathIterator.SEG_CLOSE:
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPath2DCubicBezierTo

                } else if (ch instanceof CTPath2DLineTo){
                    CTAdjPoint2D pt = ((CTPath2DLineTo)ch).getPt();
                    path.lineTo((float)Units.toPoints((Long)pt.getX()),
                                (float)Units.toPoints((Long)pt.getY()));
                } else if (ch instanceof CTPath2DCubicBezierTo){
                    CTPath2DCubicBezierTo bez = ((CTPath2DCubicBezierTo)ch);
                    CTAdjPoint2D pt1 = bez.getPtArray(0);
                    CTAdjPoint2D pt2 = bez.getPtArray(1);
                    CTAdjPoint2D pt3 = bez.getPtArray(2);
                    path.curveTo(
                            (float) (Units.toPoints((Long) pt1.getX()) * scaleW),
                            (float) (Units.toPoints((Long) pt1.getY()) * scaleH),
                            (float) (Units.toPoints((Long) pt2.getX()) * scaleW),
                            (float) (Units.toPoints((Long) pt2.getY()) * scaleH),
 
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPath2DCubicBezierTo

                    ln.setX(Units.toEMU(vals[0]) - x0);
                    ln.setY(Units.toEMU(vals[1]) - y0);
                    numPoints++;
                    break;
                case PathIterator.SEG_CUBICTO:
                    CTPath2DCubicBezierTo bez = ctPath.addNewCubicBezTo();
                    CTAdjPoint2D p1 = bez.addNewPt();
                    p1.setX(Units.toEMU(vals[0]) - x0);
                    p1.setY(Units.toEMU(vals[1]) - y0);
                    CTAdjPoint2D p2 = bez.addNewPt();
                    p2.setX(Units.toEMU(vals[2]) - x0);
                    p2.setY(Units.toEMU(vals[3]) - y0);
                    CTAdjPoint2D p3 = bez.addNewPt();
                    p3.setX(Units.toEMU(vals[4]) - x0);
                    p3.setY(Units.toEMU(vals[5]) - y0);
                    numPoints += 3;
                    break;
                case PathIterator.SEG_CLOSE:
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPath2DCubicBezierTo

                } else if (ch instanceof CTPath2DLineTo){
                    CTAdjPoint2D pt = ((CTPath2DLineTo)ch).getPt();
                    path.lineTo((float)Units.toPoints((Long)pt.getX()),
                                (float)Units.toPoints((Long)pt.getY()));
                } else if (ch instanceof CTPath2DCubicBezierTo){
                    CTPath2DCubicBezierTo bez = ((CTPath2DCubicBezierTo)ch);
                    CTAdjPoint2D pt1 = bez.getPtArray(0);
                    CTAdjPoint2D pt2 = bez.getPtArray(1);
                    CTAdjPoint2D pt3 = bez.getPtArray(2);
                    path.curveTo(
                            (float) (Units.toPoints((Long) pt1.getX()) * scaleW),
                            (float) (Units.toPoints((Long) pt1.getY()) * scaleH),
                            (float) (Units.toPoints((Long) pt2.getX()) * scaleW),
                            (float) (Units.toPoints((Long) pt2.getY()) * scaleH),
 
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPath2DCubicBezierTo

                    ln.setX(Units.toEMU(vals[0]) - x0);
                    ln.setY(Units.toEMU(vals[1]) - y0);
                    numPoints++;
                    break;
                case PathIterator.SEG_CUBICTO:
                    CTPath2DCubicBezierTo bez = ctPath.addNewCubicBezTo();
                    CTAdjPoint2D p1 = bez.addNewPt();
                    p1.setX(Units.toEMU(vals[0]) - x0);
                    p1.setY(Units.toEMU(vals[1]) - y0);
                    CTAdjPoint2D p2 = bez.addNewPt();
                    p2.setX(Units.toEMU(vals[2]) - x0);
                    p2.setY(Units.toEMU(vals[3]) - y0);
                    CTAdjPoint2D p3 = bez.addNewPt();
                    p3.setX(Units.toEMU(vals[4]) - x0);
                    p3.setY(Units.toEMU(vals[5]) - y0);
                    numPoints += 3;
                    break;
                case PathIterator.SEG_CLOSE:
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPath2DCubicBezierTo

                } else if (ch instanceof CTPath2DLineTo){
                    CTAdjPoint2D pt = ((CTPath2DLineTo)ch).getPt();
                    path.lineTo((float)Units.toPoints((Long)pt.getX() + x0),
                                (float)Units.toPoints((Long)pt.getY() + y0));
                } else if (ch instanceof CTPath2DCubicBezierTo){
                    CTPath2DCubicBezierTo bez = ((CTPath2DCubicBezierTo)ch);
                    CTAdjPoint2D pt1 = bez.getPtArray(0);
                    CTAdjPoint2D pt2 = bez.getPtArray(1);
                    CTAdjPoint2D pt3 = bez.getPtArray(2);
                    path.curveTo(
                            (float)Units.toPoints((Long) pt1.getX() + x0),
                            (float)Units.toPoints((Long) pt1.getY() + y0),
                            (float)Units.toPoints((Long) pt2.getX() + x0),
                            (float)Units.toPoints((Long) pt2.getY() + y0),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.