Package java.awt.geom

Examples of java.awt.geom.Path2D.curveTo()


      {controlPoint1 = pathObject.getCurrentPoint();}
      Point2D finalPoint = getPoint();
      Point2D controlPoint2 = getControl2();
      if(controlPoint2 == null)
      {controlPoint2 = finalPoint;}
      pathObject.curveTo(
        controlPoint1.getX(),
        controlPoint1.getY(),
        controlPoint2.getX(),
        controlPoint2.getY(),
        finalPoint.getX(),
View Full Code Here


                    path.lineTo(targetX, targetY);
                }

                if ((i > 0) && (i < (xPoints.length - 1))) {
                    // add curve
                    path.curveTo(ax, ay, bx, by, zx, zy);
                }
            }

            graphics.draw(path);
View Full Code Here

                new Point2D.Double(    curveConstant*(leftRadius.getMaxRight(exteriorWidth)) + lco,     tco),
                new Point2D.Double(    lco,                                                             tco+curveConstant*(leftRadius.getMaxLeft(exteriorHeight))),
                new Point2D.Double(    lco,                                                             tco+leftRadius.getMaxLeft(exteriorHeight)));
           
            path.moveTo(    (leftCurvePoints[0][3].getX()),         (leftCurvePoints[0][3].getY()));
            path.curveTo(    leftCurvePoints[0][2].getX(),         leftCurvePoints[0][2].getY(),
                            leftCurvePoints[0][1].getX(),        leftCurvePoints[0][1].getY(),
                            leftCurvePoints[0][0].getX(),        leftCurvePoints[0][0].getY());
        } else {
            path.moveTo(    lco,                 tco);
        }
View Full Code Here

                    new Point2D.Double(    sideWidth - curveConstant*(rightRadius.getMaxLeft(exteriorWidth)) - rco,         tco),
                    new Point2D.Double(    sideWidth - rco,                                                                 tco + curveConstant*(rightRadius.getMaxRight(exteriorHeight))),
                    new Point2D.Double(    sideWidth - rco,                                                                 tco + rightRadius.getMaxRight(exteriorHeight)));
           
            path.lineTo(     rightCurvePoints[0][0].getX(), rightCurvePoints[0][0].getY());
            path.curveTo(    rightCurvePoints[0][1].getX(), rightCurvePoints[0][1].getY(),
                            rightCurvePoints[0][2].getX(), rightCurvePoints[0][2].getY(),
                            (rightCurvePoints[0][3].getX()), (rightCurvePoints[0][3].getY()));
        } else {
            path.lineTo(sideWidth - rightRadius.getMaxLeft(exteriorWidth/2) - rco,         tco);
        }
View Full Code Here

                        new Point2D.Double(    sideWidth - curveConstant*(rightRadius.getMaxLeft(interiorWidth)) - rco,             tco),
                        new Point2D.Double(    sideWidth - rco,                                                                     tco + curveConstant*(rightRadius.getMaxRight(interiorHeight))),
                        new Point2D.Double(    sideWidth - rco,                                                                     tco + rightRadius.getMaxRight(interiorHeight)));
               
                path.lineTo((rightCurvePoints[0][3].getX()), (rightCurvePoints[0][3].getY()));
                path.curveTo(    rightCurvePoints[0][2].getX(), rightCurvePoints[0][2].getY(),
                                rightCurvePoints[0][1].getX(), rightCurvePoints[0][1].getY(),
                                rightCurvePoints[0][0].getX(), rightCurvePoints[0][0].getY());
            } else {
                path.lineTo(sideWidth - rco,                 tco);
            }
View Full Code Here

                    new Point2D.Double(    curveConstant*(leftRadius.getMaxRight(interiorWidth)) + lco,         tco),
                    new Point2D.Double(    lco,                                                                 tco + curveConstant*(leftRadius.getMaxLeft(interiorHeight))),
                    new Point2D.Double(    lco,                                                                 tco + leftRadius.getMaxLeft(interiorHeight)));
               
                path.lineTo(leftCurvePoints[0][0].getX(), leftCurvePoints[0][0].getY());
                path.curveTo(    leftCurvePoints[0][1].getX(), leftCurvePoints[0][1].getY(),
                        leftCurvePoints[0][2].getX(), leftCurvePoints[0][2].getY(),
                        (leftCurvePoints[0][3].getX()), (leftCurvePoints[0][3].getY()));
            } else {
                path.lineTo(leftRadius.getMaxRight(interiorHeight) +  lco,                 tco);
            }
View Full Code Here

      path.lineTo(targetX, targetY);
    }

    if (i>0 && i < xPoints.length-1) {
      // add curve
      path.curveTo(ax, ay, bx, by, zx, zy);
    }

    if (i == xPoints.length-1) {
      Line2D.Double lineDouble = new Line2D.Double(xPoints[i-1], yPoints[i-1], xPoints[i], yPoints[i]);
      drawArrowHead(lineDouble);
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.