Package java.awt.geom

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


      Handle[] hs = handles;
      if (hs.length > 0) {
        boolean first = true;
        for (Handle h : hs) {
          if (first) {
            p.moveTo(h.getX(), h.getY());
            first = false;
          } else {
            p.lineTo(h.getX(), h.getY());
          }
        }
View Full Code Here


    } else { // we need to add wings
      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

          path.lineTo(segments[i].getX1(), segments[i].getY1());
          break;
        }
        case PathIterator.SEG_MOVETO:
        {
          path.moveTo(segments[i].getX1(), segments[i].getY1());
          break;
        }
        case PathIterator.SEG_QUADTO:
        {
          path.quadTo(segments[i].getX1(), segments[i].getY1(),
View Full Code Here

            // RIGHT POLYGON
            if (y2 >= 0.0) {
                final double yright = (y1 + y2) / 2.0 + stackRight[1];
                final float transYRight
                    = (float) rangeAxis.valueToJava2D(yright, dataArea, edge1);
                right.moveTo((float) xx1, transStack1);
                right.lineTo((float) xx1, transY1);
                right.lineTo((float) xxRight, transYRight);
                right.lineTo((float) xxRight, transStackRight);
                right.closePath();
            }
View Full Code Here

                right.lineTo((float) xxRight, transYRight);
                right.lineTo((float) xxRight, transStackRight);
                right.closePath();
            }
            else {
                right.moveTo((float) xx1, transStack1);
                right.lineTo((float) xx1, transY1);
                right.lineTo((float) xxRight, transStackRight);
                right.closePath();
            }
        }
View Full Code Here

            final float transStackRight = (float) rangeAxis.valueToJava2D(
                    adjStackRight[0], dataArea, edge1);

            // RIGHT POLYGON
            if (y2 >= 0.0) {
                right.moveTo((float) xx1, transStack1);
                right.lineTo((float) xx1, transY1);
                right.lineTo((float) xxRight, transStackRight);
                right.closePath();
            }
            else {
View Full Code Here

            }
            else {
                final double yright = (y1 + y2) / 2.0 + stackRight[0];
                final float transYRight = (float) rangeAxis.valueToJava2D(yright,
                        dataArea, edge1);
                right.moveTo((float) xx1, transStack1);
                right.lineTo((float) xx1, transY1);
                right.lineTo((float) xxRight, transYRight);
                right.lineTo((float) xxRight, transStackRight);
                right.closePath();
            }
View Full Code Here

        }

        GeneralPath path = new GeneralPath(GeneralPath.WIND_EVEN_ODD, length);

        if (length > startIndex) {
            path.moveTo(xpoints[startIndex], ypoints[startIndex]);
            for (int j = startIndex + 1; j < length; j++) {
                path.lineTo(xpoints[j], ypoints[j]);
            }

            if (isPolygon) {
View Full Code Here

   * @return A diamond shape.
   */
  public static Shape createDiamond(final float s)
  {
    final GeneralPath p0 = new GeneralPath();
    p0.moveTo(0.0f, -s);
    p0.lineTo(s, 0.0f);
    p0.lineTo(0.0f, s);
    p0.lineTo(-s, 0.0f);
    p0.closePath();
    return p0;
View Full Code Here

   * @return A triangle shape.
   */
  public static Shape createUpTriangle(final float s)
  {
    final GeneralPath p0 = new GeneralPath();
    p0.moveTo(0.0f, -s);
    p0.lineTo(s, s);
    p0.lineTo(-s, s);
    p0.closePath();
    return p0;
  }
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.