Package java.awt.geom

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


 
    GeneralPath path = new GeneralPath();
 
    //top of cylinder
    path.moveTo(point1.x, point1.y);
    path.curveTo(
      point1.x + cpOffsetX, point1.y + cpOffsetYTop,
      point2.x - cpOffsetX, point2.y + cpOffsetYTop,
      point2.x, point2.y
      );
    path.curveTo(
View Full Code Here


    path.curveTo(
      point1.x + cpOffsetX, point1.y + cpOffsetYTop,
      point2.x - cpOffsetX, point2.y + cpOffsetYTop,
      point2.x, point2.y
      );
    path.curveTo(
      point2.x - cpOffsetX, point2.y - cpOffsetYTop,
      point1.x + cpOffsetX, point1.y - cpOffsetYTop,
      point1.x, point1.y
      );
 
View Full Code Here

 
    //side of cylinder
    path.moveTo(point1.x, point1.y);
    path.lineTo(point4.x, point4.y);
   
    path.curveTo(
      point4.x + cpOffsetX, point4.y + cpOffsetYBottom,
      point3.x - cpOffsetX, point3.y + cpOffsetYBottom,
      point3.x, point3.y
      );
 
View Full Code Here

    ShapePoint top = new ShapePoint((float)pointMid.getX(), (float)bounds.getMinY());
    ShapePoint bottom = new ShapePoint((float)pointMid.getX(), (float)bounds.getMaxY());

    GeneralPath path = new GeneralPath();
    path.moveTo(top.x, top.y);
    path.curveTo(top.x + xOff, top.y, right.x, right.y - yOff, right.x, right.y);
    path.curveTo(right.x, right.y + yOff, bottom.x + xOff, bottom.y, bottom.x, bottom.y);
    path.curveTo(bottom.x - xOff, bottom.y, left.x, left.y + yOff, left.x, left.y);
    path.curveTo(left.x, left.y - yOff, top.x - xOff, top.y, top.x, top.y);
    path.closePath();
View Full Code Here

    ShapePoint bottom = new ShapePoint((float)pointMid.getX(), (float)bounds.getMaxY());

    GeneralPath path = new GeneralPath();
    path.moveTo(top.x, top.y);
    path.curveTo(top.x + xOff, top.y, right.x, right.y - yOff, right.x, right.y);
    path.curveTo(right.x, right.y + yOff, bottom.x + xOff, bottom.y, bottom.x, bottom.y);
    path.curveTo(bottom.x - xOff, bottom.y, left.x, left.y + yOff, left.x, left.y);
    path.curveTo(left.x, left.y - yOff, top.x - xOff, top.y, top.x, top.y);
    path.closePath();

    return path;
View Full Code Here

    GeneralPath path = new GeneralPath();
    path.moveTo(top.x, top.y);
    path.curveTo(top.x + xOff, top.y, right.x, right.y - yOff, right.x, right.y);
    path.curveTo(right.x, right.y + yOff, bottom.x + xOff, bottom.y, bottom.x, bottom.y);
    path.curveTo(bottom.x - xOff, bottom.y, left.x, left.y + yOff, left.x, left.y);
    path.curveTo(left.x, left.y - yOff, top.x - xOff, top.y, top.x, top.y);
    path.closePath();

    return path;
  }
View Full Code Here

    GeneralPath path = new GeneralPath();
    path.moveTo(top.x, top.y);
    path.curveTo(top.x + xOff, top.y, right.x, right.y - yOff, right.x, right.y);
    path.curveTo(right.x, right.y + yOff, bottom.x + xOff, bottom.y, bottom.x, bottom.y);
    path.curveTo(bottom.x - xOff, bottom.y, left.x, left.y + yOff, left.x, left.y);
    path.curveTo(left.x, left.y - yOff, top.x - xOff, top.y, top.x, top.y);
    path.closePath();

    return path;
  }
View Full Code Here

      Point p2 = l.get(pointIndex);
      Point p3 = l.get(pointIndex + 1);
      Point mPoint = calculatePoint(p1, p2);
      p.lineTo(mPoint.x, mPoint.y);
      mPoint = calculatePoint(p3, p2);
      p.curveTo(p2.x, p2.y, p2.x, p2.y, mPoint.x, mPoint.y);
    }
    return p;
  }

  private static Point calculatePoint(Point p1, Point p2) {
View Full Code Here

                    break;
                case PathIterator.SEG_QUADTO:
                    p.quadTo(points[j], points[j + 1], points[j + 2], points[j + 3]);
                    break;
                case PathIterator.SEG_CUBICTO:
                    p.curveTo(points[j], points[j + 1], points[j + 2], points[j + 3], points[j + 4], points[j + 5]);
                    break;
                case PathIterator.SEG_CLOSE:
                    p.closePath();
                    break;
                }
View Full Code Here

        shape2.lineTo(13.792969, 20.0);
        shape2.closePath();
        shape2.moveTo(14.640625, 17.648438);
        shape2.lineTo(16.582031, 17.648438);
        shape2.lineTo(15.984375, 16.0625);
        shape2.curveTo(15.802081, 15.580734, 15.666664, 15.184901, 15.578125, 14.875);
        shape2.curveTo(15.505205, 15.242192, 15.402341, 15.606775, 15.269531, 15.96875);
        shape2.closePath();
        g.fill(shape2);
    }
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.