View RSS Feed

Java AWT

Java Abstract Window Toolkit (AWT)

  1. Drawing an Arc

    by , 03-06-2012 at 08:54 PM
    A piece of ellipse is drawn by Arc2D. Following present an arc class.
    • A bounding rectangle
    • An angular extent
    • A start angle
    • A closure type

    An ellipse in float & double precision are specified.
    • Arc2D.Double
    • Arc2D.Float

    Arc2D class defines 3 types of arcs:
    • OPEN
    • CHORD
    • PIE

    The parameters and size of the arc are set by applying these different methods:
    • By supplied Dimension2D and Point2D.
    • Directly