View RSS Feed

Java AWT

Drawing an Ellipse

Rate this Entry
by , 03-06-2012 at 08:52 PM (963 Views)
Ellipse2D class presents the ellipse which is defined by bounded rectangles. An ellipse in float & precision are specified by these subclasses.

  • Ellipse2D.Double
  • Ellipse2D.Float


Following attributes define ellipse:

  • Location
  • Height
  • Width


Java Code:
Creation of an ellipse is explained by this example.
// draw Ellipse2D.Double
g2.draw(new Ellipse2D.Double(x, y,
                             rectwidth,
                             rectheight));

Submit "Drawing an Ellipse" to Facebook Submit "Drawing an Ellipse" to Digg Submit "Drawing an Ellipse" to del.icio.us Submit "Drawing an Ellipse" to StumbleUpon Submit "Drawing an Ellipse" to Google

Categories
Graphics

Comments