Package java.awt.geom

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


    GeneralPath graphics = new GeneralPath();
    graphics.moveTo(start1.x,start1.y);
    graphics.lineTo(inter1.x,inter1.y);
    graphics.lineTo(edge1.x,edge1.y);
    graphics.quadTo(edgeCntrl1.x,edgeCntrl1.y,end.x,end.y);
    graphics.quadTo(edgeCntrl2.x,edgeCntrl2.y,edge2.x,edge2.y);
    graphics.lineTo(inter2.x,inter2.y);
    graphics.lineTo(start2.x,start2.y);
    graphics.lineTo(start1.x,start1.y);
    graphics.closePath();
   
View Full Code Here


          {
            final float x1 = in.readFloat();
            final float y1 = in.readFloat();
            final float x2 = in.readFloat();
            final float y2 = in.readFloat();
            gp.quadTo(x1, y1, x2, y2);
            break;
          }
        case PathIterator.SEG_CUBICTO:
          {
            final float x1 = in.readFloat();
View Full Code Here

   
    GeneralPath graphics = new GeneralPath();
    graphics.moveTo(start1.x,start1.y);
    graphics.lineTo(inter1.x,inter1.y);
    graphics.lineTo(edge1.x,edge1.y);
    graphics.quadTo(edgeCntrl1.x,edgeCntrl1.y,end.x,end.y);
    graphics.quadTo(edgeCntrl2.x,edgeCntrl2.y,edge2.x,edge2.y);
    graphics.lineTo(inter2.x,inter2.y);
    graphics.lineTo(start2.x,start2.y);
    graphics.lineTo(start1.x,start1.y);
    graphics.closePath();
View Full Code Here

    GeneralPath graphics = new GeneralPath();
    graphics.moveTo(start1.x,start1.y);
    graphics.lineTo(inter1.x,inter1.y);
    graphics.lineTo(edge1.x,edge1.y);
    graphics.quadTo(edgeCntrl1.x,edgeCntrl1.y,end.x,end.y);
    graphics.quadTo(edgeCntrl2.x,edgeCntrl2.y,edge2.x,edge2.y);
    graphics.lineTo(inter2.x,inter2.y);
    graphics.lineTo(start2.x,start2.y);
    graphics.lineTo(start1.x,start1.y);
    graphics.closePath();
   
View Full Code Here

    abs_e = (float)Math.sqrt(ex * ex + ey * ey);
    ex /= abs_e;
    ey /= abs_e;
    GeneralPath bodyPath = new GeneralPath();
    bodyPath.moveTo(p2x + (ey - ex) * adjSize, p2y - (ex + ey) * adjSize);
    bodyPath.quadTo(cx, cy, p1x, p1y - bodyWidth / 2);
    bodyPath.lineTo(p1x, p1y + bodyWidth / 2);
    bodyPath.quadTo(cx, cy, p2x - (ey + ex) * adjSize, p2y + (ex - ey) * adjSize);
    bodyPath.closePath();

    adjSize = (float)(headSize / Math.sqrt(2));
View Full Code Here

    ey /= abs_e;
    GeneralPath bodyPath = new GeneralPath();
    bodyPath.moveTo(p2x + (ey - ex) * adjSize, p2y - (ex + ey) * adjSize);
    bodyPath.quadTo(cx, cy, p1x, p1y - bodyWidth / 2);
    bodyPath.lineTo(p1x, p1y + bodyWidth / 2);
    bodyPath.quadTo(cx, cy, p2x - (ey + ex) * adjSize, p2y + (ex - ey) * adjSize);
    bodyPath.closePath();

    adjSize = (float)(headSize / Math.sqrt(2));
    ex = p2x - cx;
    ey = p2y - cy;
View Full Code Here

                                (float)(coordsTo[0] * interp),
                                (float)(coordsTo[1] * interp)
                                );
                        break;
                    case PathIterator.SEG_QUADTO:
                        midPath.quadTo(
                                (float)(coordsTo[0] * interp),
                                (float)(coordsTo[1] * interp),
                                (float)(coordsTo[2] * interp),
                                (float)(coordsTo[3] * interp)
                                );
View Full Code Here

                                (float)(coordsFrom[0] * (1 - interp) + coordsTo[0] * interp),
                                (float)(coordsFrom[1] * (1 - interp) + coordsTo[1] * interp)
                                );
                        break;
                    case PathIterator.SEG_QUADTO:
                        midPath.quadTo(
                                (float)(coordsFrom[0] * (1 - interp) + coordsTo[0] * interp),
                                (float)(coordsFrom[1] * (1 - interp) + coordsTo[1] * interp),
                                (float)(coordsFrom[2] * (1 - interp) + coordsTo[2] * interp),
                                (float)(coordsFrom[3] * (1 - interp) + coordsTo[3] * interp)
                                );
View Full Code Here

 
  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

        Point2D.Double west = new Point2D.Double(center.x + (center.x - east.x), center.y + (center.y - east.y));

        // XXX Note: This is not an ellipse. What we really want is a "smooth polygon"...
        GeneralPath p = new GeneralPath();
        p.moveTo((float) north.x, (float) north.y);
        p.quadTo((float) west.x, (float) west.y, (float) south.x, (float) south.y);
        p.quadTo((float) east.x, (float) east.y, (float) north.x, (float) north.y);
        p.closePath();
        return p;
    }
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.