Package java.awt.geom

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


        path.lineTo(-windBarbDefinition.shortBarbLength / 2.0f, positionOnPath
                + windBarbDefinition.shortBarbLength / 2.0f);

        path.moveTo(-windBarbDefinition.shortBarbLength / 2.0f, positionOnPath
                - windBarbDefinition.shortBarbLength / 2.0f);
        path.lineTo(windBarbDefinition.shortBarbLength / 2.0f, positionOnPath
                + windBarbDefinition.shortBarbLength / 2.0f);

        // FLIP for geotools
        final Shape createTransformedShape = path.createTransformedShape(AffineTransform
                .getScaleInstance(1, -1));
View Full Code Here


                    new Point2D.Double(    sideWidth - rightRadius.getMaxLeft(exteriorWidth) - rco,                         tco),
                    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

            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);
        }

       
        // check if we draw the interior
        if(drawInterior) {
View Full Code Here

                        new Point2D.Double(    sideWidth - rightRadius.getMaxLeft(interiorWidth) - rco,                             tco),
                        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

                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);
            }
           
            // top left interior, check we have a radius
            if(leftRadius.getMaxRight(interiorWidth) > 0) {
               
View Full Code Here

                    new Point2D.Double(    leftRadius.getMaxRight(interiorWidth) + lco,                         tco),
                    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(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);
            }
           
            // only close the path if its a full 2d path. If its just the exterior line we leave it open
            path.closePath();
        }
View Full Code Here

    }

    if (i==0) {
      path.moveTo(targetX, targetY);
    } else {
      path.lineTo(targetX, targetY);
    }

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

        // Create a polygon.

        shape.reset();
        shape.moveTo(x, y);
        shape.lineTo(x - theDirection.data[0] + perp.data[0], y
            - theDirection.data[1] + perp.data[1]);
        shape.lineTo(x - theDirection.data[0] - perp.data[0], y
            - theDirection.data[1] - perp.data[1]);
        shape.closePath();
View Full Code Here

        shape.reset();
        shape.moveTo(x, y);
        shape.lineTo(x - theDirection.data[0] + perp.data[0], y
            - theDirection.data[1] + perp.data[1]);
        shape.lineTo(x - theDirection.data[0] - perp.data[0], y
            - theDirection.data[1] - perp.data[1]);
        shape.closePath();

        g.fill(shape);
      }
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.