Package java.awt.geom

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


      int wingHeight = (height - width) / 2;
      int dx = Math.min(20, wingHeight / 4);
     
      GeneralPath path = new GeneralPath();
      path.moveTo(-width, -height / 2);
      path.quadTo(-width + dx, -(width + height) / 4, -width, -width / 2);
      path.append(base, true);
      path.quadTo(-width + dx, (width + height) / 4, -width, height / 2);
      return path;
    }
  }
View Full Code Here


     
      GeneralPath path = new GeneralPath();
      path.moveTo(-width, -height / 2);
      path.quadTo(-width + dx, -(width + height) / 4, -width, -width / 2);
      path.append(base, true);
      path.quadTo(-width + dx, (width + height) / 4, -width, height / 2);
      return path;
    }
  }

  static void paintInputLines(InstancePainter painter, AbstractGate factory) {
View Full Code Here

          path.moveTo(segments[i].getX1(), segments[i].getY1());
          break;
        }
        case PathIterator.SEG_QUADTO:
        {
          path.quadTo(segments[i].getX1(), segments[i].getY1(),
              segments[i].getX2(), segments[i].getY2());
          break;
        }
        default:
          throw new IllegalStateException("Unexpected result from path iterator.");
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

        case PathIterator.SEG_LINETO:
        path.lineTo(coordinates[0], coordinates[1]);
              break;

    case PathIterator.SEG_QUADTO:
        path.quadTo(coordinates[0], coordinates[1],
        coordinates[2], coordinates[3]);
        break;

    case PathIterator.SEG_CUBICTO:
        path.curveTo(coordinates[0], coordinates[1],
View Full Code Here

    public void testGeneralPathSerialization() {
        GeneralPath g1 = new GeneralPath();
        g1.moveTo(1.0f, 2.0f);
        g1.lineTo(3.0f, 4.0f);
        g1.curveTo(5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f);
        g1.quadTo(1.0f, 2.0f, 3.0f, 4.0f);
        g1.closePath();
        GeneralPath g2 = null;
        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutputStream out = new ObjectOutputStream(buffer);
View Full Code Here

                        case PathIterator.SEG_CUBICTO :
                            gp.curveTo(args[0], args[1], args[2],
                                    args[3], args[4], args[5]);
                            break;
                        case PathIterator.SEG_QUADTO :
                            gp.quadTo(args[0], args[1], args[2], args[3]);
                            break;
                        case PathIterator.SEG_CLOSE :
                            gp.closePath();
                            break;
                        default :
View Full Code Here

                                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

          {
            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

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.