Examples of curveTo()


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

            final float cv = (float)(4.0 / 3.0 * a * b / c);
            */
            final float cv = 0.5522848f;
            path.moveTo(x + hw, y);
            // Top right
            path.curveTo(x + hw + hw * cv, y, x + w, y + hh - hh * cv, x + w, y + hh);
            // Bottom right
            path.curveTo(x + w, y + hh + hh * cv, x + hw + hw * cv, y + h, x + hw, y + h);
            // Bottom left
            path.curveTo(x + hh - hh * cv, y + h, x, y + hh + hh * cv, x, y + hh);
            // Top left
View Full Code Here

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

            final float cv = 0.5522848f;
            path.moveTo(x + hw, y);
            // Top right
            path.curveTo(x + hw + hw * cv, y, x + w, y + hh - hh * cv, x + w, y + hh);
            // Bottom right
            path.curveTo(x + w, y + hh + hh * cv, x + hw + hw * cv, y + h, x + hw, y + h);
            // Bottom left
            path.curveTo(x + hh - hh * cv, y + h, x, y + hh + hh * cv, x, y + hh);
            // Top left
            path.curveTo(x, y + hh - hh * cv, x + hh - hh * cv, y, x + hw, y);
            return path;
View Full Code Here

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

            // Top right
            path.curveTo(x + hw + hw * cv, y, x + w, y + hh - hh * cv, x + w, y + hh);
            // Bottom right
            path.curveTo(x + w, y + hh + hh * cv, x + hw + hw * cv, y + h, x + hw, y + h);
            // Bottom left
            path.curveTo(x + hh - hh * cv, y + h, x, y + hh + hh * cv, x, y + hh);
            // Top left
            path.curveTo(x, y + hh - hh * cv, x + hh - hh * cv, y, x + hw, y);
            return path;
        }

View Full Code Here

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

            // Bottom right
            path.curveTo(x + w, y + hh + hh * cv, x + hw + hw * cv, y + h, x + hw, y + h);
            // Bottom left
            path.curveTo(x + hh - hh * cv, y + h, x, y + hh + hh * cv, x, y + hh);
            // Top left
            path.curveTo(x, y + hh - hh * cv, x + hh - hh * cv, y, x + hw, y);
            return path;
        }

        protected void draw(Graphics g, Shape shape, Color[] colors) {
            final float[] coords = new float[6];
View Full Code Here

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

    path.quadTo(1, 2, 3, 4);
    pt.setLocation(3, 4);
    harness.check(pt.equals(path.getCurrentPoint()));

    // Check 7
    path.curveTo(5, 6, 7, 8, 9, 10);
    pt.setLocation(9, 10);
    harness.check(pt.equals(path.getCurrentPoint()));

    // Check 8
    path.closePath();
View Full Code Here

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

    path.moveTo(1.1f, 1.2f);
    path.lineTo(2.1f, 2.2f);
    path.quadTo(3.1f, 3.2f, 4.1f, 4.2f);
    path.closePath();
    path.moveTo(5.1f, 5.2f);
    path.curveTo(6.1f, 6.2f, 7.1f, 7.2f, 8.1f, 8.2f);

  }


  private static final float EPSILON_F = 1e-6f;
View Full Code Here

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

    path.moveTo(10, 11);
    path.lineTo(20, 21);
    path.closePath();
    path.moveTo(30, 31);
    path.quadTo(40, 41, 42, 43);
    path.curveTo(50, 51, 52, 53, 54, 55);
   
    pit = path.getPathIterator(null);
    h.check(pit.getWindingRule(), PathIterator.WIND_EVEN_ODD); // 1
    h.check(!pit.isDone());                                    // 2
    h.check(pit.currentSegment(f), PathIterator.SEG_MOVETO);   // 3
View Full Code Here

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

    path.moveTo(10, 11);
    path.lineTo(20, 21);
    path.closePath();
    path.moveTo(30, 31);
    path.quadTo(40, 41, 42, 43);
    path.curveTo(50, 51, 52, 53, 54, 55);
   
    tx = new AffineTransform();
    tx.translate(2, 3);
    tx.scale(10, 10);
View Full Code Here

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

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

    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
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.