The Java Developers Almanac 1.4


Order this book from Amazon.

   
Home > List of Packages > java.awt.geom  [4 examples]

e657. Creating a Shape Using Lines and Curves

    GeneralPath shape = new GeneralPath();
    shape.moveTo(x, y);
    shape.lineTo(x, y);
    shape.quadTo(controlPointX, controlPointY, x, y);
    shape.curveTo(controlPointX1, controlPointY1, controlPointX2, controlPointY2, x, y);
    shape.closePath();

 Related Examples
e656. Creating Basic Shapes
e658. Combining Shapes
e659. Scaling, Shearing, Translating, and Rotating a Shape


© 2002 Addison-Wesley.