Examples of quadTo()


Examples of java.awt.geom.GeneralPath.quadTo()

          double ny2 = dy * Math.min(arcSize, dist / 2) / dist;

          double x2 = tmp.getX() + nx2;
          double y2 = tmp.getY() + ny2;

          path.quadTo((float) tmp.getX(), (float) tmp.getY(),
              (float) x2, (float) y2);
          tmp = new mxPoint(x2, y2);
        }
        else
        {
View Full Code Here

Examples of java.awt.geom.GeneralPath.quadTo()

     */
    public static Shape createSwatchShape() {
        if (jdk12beta4()) {
            GeneralPath p = new GeneralPath();
            p.moveTo(10, 30);
            p.quadTo(30, 10, 85, 15);

            Stroke str = new BasicStroke(35, BasicStroke.CAP_BUTT,
                    BasicStroke.JOIN_ROUND);

            Shape s = str.createStrokedShape(p);
View Full Code Here

Examples of java.awt.geom.GeneralPath.quadTo()

            if (point.onCurve && !nextPoint1.onCurve && nextPoint2.onCurve)
            {
                if (nextPoint1.endOfContour)
                {
                    // use the starting point as end point
                    path.quadTo(nextPoint1.x, nextPoint1.y, startingPoint.x, startingPoint.y);
                }
                else
                {
                    path.quadTo(nextPoint1.x, nextPoint1.y, nextPoint2.x, nextPoint2.y);
                }
View Full Code Here

Examples of java.awt.geom.GeneralPath.quadTo()

                    // use the starting point as end point
                    path.quadTo(nextPoint1.x, nextPoint1.y, startingPoint.x, startingPoint.y);
                }
                else
                {
                    path.quadTo(nextPoint1.x, nextPoint1.y, nextPoint2.x, nextPoint2.y);
                }
                if (nextPoint1.endOfContour || nextPoint2.endOfContour)
                {
                    endOfContour = true;
                    path.closePath();
View Full Code Here

Examples of java.awt.geom.GeneralPath.quadTo()

            if (point.onCurve && !nextPoint1.onCurve && !nextPoint2.onCurve)
            {
                // interpolate endPoint
                int endPointX = midValue(nextPoint1.x, nextPoint2.x);
                int endPointY = midValue(nextPoint1.y, nextPoint2.y);
                path.quadTo(nextPoint1.x, nextPoint1.y, endPointX, endPointY);
                if (point.endOfContour || nextPoint1.endOfContour || nextPoint2.endOfContour)
                {
                    path.quadTo(nextPoint2.x, nextPoint2.y, startingPoint.x, startingPoint.y);
                    endOfContour = true;
                    path.closePath();
View Full Code Here

Examples of java.awt.geom.GeneralPath.quadTo()

                int endPointX = midValue(nextPoint1.x, nextPoint2.x);
                int endPointY = midValue(nextPoint1.y, nextPoint2.y);
                path.quadTo(nextPoint1.x, nextPoint1.y, endPointX, endPointY);
                if (point.endOfContour || nextPoint1.endOfContour || nextPoint2.endOfContour)
                {
                    path.quadTo(nextPoint2.x, nextPoint2.y, startingPoint.x, startingPoint.y);
                    endOfContour = true;
                    path.closePath();
                }
                i+=2;
                lastCtrlPoint = nextPoint1;
View Full Code Here

Examples of java.awt.geom.GeneralPath.quadTo()

                lastCtrlPoint = new Point(midValue(lastCtrlPoint.x, (int)lastEndPoint.getX()),
                        midValue(lastCtrlPoint.y, (int)lastEndPoint.getY()));
                // interpolate endPoint
                int endPointX = midValue((int)lastEndPoint.getX(), nextPoint1.x);
                int endPointY = midValue((int)lastEndPoint.getY(), nextPoint1.y);
                path.quadTo(lastCtrlPoint.x, lastCtrlPoint.y, endPointX, endPointY);
                if (point.endOfContour || nextPoint1.endOfContour)
                {
                    endOfContour = true;
                    path.closePath();
                }
View Full Code Here

Examples of java.awt.geom.GeneralPath.quadTo()

                i++;
                continue;
            }
            if (!point.onCurve && nextPoint1.onCurve)
            {
                path.quadTo(point.x, point.y, nextPoint1.x, nextPoint1.y);
                if (point.endOfContour || nextPoint1.endOfContour)
                {
                    endOfContour = true;
                    path.closePath();
                }
View Full Code Here

Examples of java.awt.geom.GeneralPath.quadTo()

                                break;
                            case java.awt.geom.PathIterator.SEG_LINETO:
                                s.lineTo(coords[0], coords[1]);
                                break;
                            case java.awt.geom.PathIterator.SEG_QUADTO:
                                s.quadTo(coords[0], coords[1], coords[2], coords[3]);
                                break;
                            case java.awt.geom.PathIterator.SEG_CUBICTO:
                                s.curveTo(coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]);
                                break;
                            }
View Full Code Here

Examples of java.awt.geom.GeneralPath.quadTo()

        GeneralPath path = new GeneralPath();
        path.moveTo(100f, 100f);
        path.lineTo(200f, 150f);
        path.lineTo(300f, 200f);
        path.quadTo(450f, 525f, 400f, 250f);
        path.closePath();

        PathLength pl = new PathLength(path);

        System.out.println("New Path Length created");
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.