/[classpath]/classpath/java/awt/geom/Ellipse2D.java
ViewVC logotype

Diff of /classpath/java/awt/geom/Ellipse2D.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by smarothy, Wed Aug 25 01:00:48 2004 UTC revision 1.5 by smarothy, Wed Sep 8 20:10:52 2004 UTC
# Line 101  public abstract class Ellipse2D extends Line 101  public abstract class Ellipse2D extends
101     * Note: An ellipse cannot be represented exactly in PathIterator     * Note: An ellipse cannot be represented exactly in PathIterator
102     * segments, the outline is thefore approximated with cubic     * segments, the outline is thefore approximated with cubic
103     * Bezier segments.     * Bezier segments.
104       *
105       * @param at an optional transform.
106       * @return A path iterator.
107     */     */
108    public PathIterator getPathIterator(AffineTransform at)    public PathIterator getPathIterator(AffineTransform at)
109    {    {
# Line 139  public abstract class Ellipse2D extends Line 142  public abstract class Ellipse2D extends
142      return false;      return false;
143    }    }
144    
145      /**
146       * An {@link Ellipse2D} that stores its coordinates using <code>double</code>
147       * primitives.
148       */
149    public static class Double extends Ellipse2D    public static class Double extends Ellipse2D
150    {    {
151      /**      /**
# Line 162  public abstract class Ellipse2D extends Line 169  public abstract class Ellipse2D extends
169      public double y;      public double y;
170    
171      /**      /**
172       * Creates a new Ellipse2D with an upper-right coordinate of (0,0)       * Creates a new Ellipse2D with an upper-left coordinate of (0,0)
173       * and a zero size.       * and a zero size.
174       */       */
175      public Double()      public Double()
# Line 172  public abstract class Ellipse2D extends Line 179  public abstract class Ellipse2D extends
179      /**      /**
180       * Creates a new Ellipse2D within a given rectangle       * Creates a new Ellipse2D within a given rectangle
181       * using double-precision coordinates.<P>       * using double-precision coordinates.<P>
182       * @param x - x coordinate of the upper-right of the bounding rectangle       * @param x - x coordinate of the upper-left of the bounding rectangle
183       * @param y - y coordinate of the upper-right of the bounding rectangle       * @param y - y coordinate of the upper-left of the bounding rectangle
184       * @param w - width of the ellipse       * @param w - width of the ellipse
185       * @param h - height of the ellipse       * @param h - height of the ellipse
      *  
186       */       */
187      public Double(double x, double y, double w, double h)      public Double(double x, double y, double w, double h)
188      {      {
# Line 188  public abstract class Ellipse2D extends Line 194  public abstract class Ellipse2D extends
194    
195      /**      /**
196       * Returns the bounding-box of the ellipse.       * Returns the bounding-box of the ellipse.
197         * @return The bounding box.
198       */       */
199      public Rectangle2D getBounds2D()      public Rectangle2D getBounds2D()
200      {      {
# Line 196  public abstract class Ellipse2D extends Line 203  public abstract class Ellipse2D extends
203    
204      /**      /**
205       * Returns the height of the ellipse.       * Returns the height of the ellipse.
206         * @return The height of the ellipse.
207       */       */
208      public double getHeight()      public double getHeight()
209      {      {
# Line 204  public abstract class Ellipse2D extends Line 212  public abstract class Ellipse2D extends
212    
213      /**      /**
214       * Returns the width of the ellipse.       * Returns the width of the ellipse.
215         * @return The width of the ellipse.
216       */       */
217      public double getWidth()      public double getWidth()
218      {      {
# Line 213  public abstract class Ellipse2D extends Line 222  public abstract class Ellipse2D extends
222      /**      /**
223       * Returns x coordinate of the upper-left corner of       * Returns x coordinate of the upper-left corner of
224       * the ellipse's bounding-box.       * the ellipse's bounding-box.
225         * @return The x coordinate.
226       */       */
227      public double getX()      public double getX()
228      {      {
# Line 222  public abstract class Ellipse2D extends Line 232  public abstract class Ellipse2D extends
232      /**      /**
233       * Returns y coordinate of the upper-left corner of       * Returns y coordinate of the upper-left corner of
234       * the ellipse's bounding-box.       * the ellipse's bounding-box.
235         * @return The y coordinate.
236       */       */
237      public double getY()      public double getY()
238      {      {
# Line 229  public abstract class Ellipse2D extends Line 240  public abstract class Ellipse2D extends
240      }      }
241    
242      /**      /**
243       * Returns true if the ellipse encloses any area.       * Returns <code>true</code> if the ellipse encloses no area, and
244         * <code>false</code> otherwise.
245         *
246         * @return A boolean.
247       */       */
248      public boolean isEmpty()      public boolean isEmpty()
249      {      {
# Line 239  public abstract class Ellipse2D extends Line 253  public abstract class Ellipse2D extends
253      /**      /**
254       * Sets the geometry of the ellipse's bounding box.<P>       * Sets the geometry of the ellipse's bounding box.<P>
255       *       *
256       * @param x - x coordinate of the upper-right of the bounding rectangle       * @param x - x coordinate of the upper-left of the bounding rectangle
257       * @param y - y coordinate of the upper-right of the bounding rectangle       * @param y - y coordinate of the upper-left of the bounding rectangle
258       * @param w - width of the ellipse       * @param w - width of the ellipse
259       * @param h - height of the ellipse       * @param h - height of the ellipse
260       */       */
# Line 253  public abstract class Ellipse2D extends Line 267  public abstract class Ellipse2D extends
267      }      }
268    } // class Double    } // class Double
269    
270      /**
271       * An {@link Ellipse2D} that stores its coordinates using <code>float</code>
272       * primitives.
273       */
274    public static class Float extends Ellipse2D    public static class Float extends Ellipse2D
275    {    {
276      /**      /**
# Line 276  public abstract class Ellipse2D extends Line 294  public abstract class Ellipse2D extends
294      public float y;      public float y;
295    
296      /**      /**
297       * Creates a new Ellipse2D with an upper-right coordinate of (0,0)       * Creates a new Ellipse2D with an upper-left coordinate of (0,0)
298       * and a zero size.       * and a zero size.
299       */       */
300      public Float()      public Float()
# Line 286  public abstract class Ellipse2D extends Line 304  public abstract class Ellipse2D extends
304      /**      /**
305       * Creates a new Ellipse2D within a given rectangle       * Creates a new Ellipse2D within a given rectangle
306       * using floating-point precision.<P>       * using floating-point precision.<P>
307       * @param x - x coordinate of the upper-right of the bounding rectangle       * @param x - x coordinate of the upper-left of the bounding rectangle
308       * @param y - y coordinate of the upper-right of the bounding rectangle       * @param y - y coordinate of the upper-left of the bounding rectangle
309       * @param w - width of the ellipse       * @param w - width of the ellipse
310       * @param h - height of the ellipse       * @param h - height of the ellipse
311       *       *
# Line 302  public abstract class Ellipse2D extends Line 320  public abstract class Ellipse2D extends
320    
321      /**      /**
322       * Returns the bounding-box of the ellipse.       * Returns the bounding-box of the ellipse.
323         * @return The bounding box.
324       */       */
325      public Rectangle2D getBounds2D()      public Rectangle2D getBounds2D()
326      {      {
# Line 310  public abstract class Ellipse2D extends Line 329  public abstract class Ellipse2D extends
329    
330      /**      /**
331       * Returns the height of the ellipse.       * Returns the height of the ellipse.
332         * @return The height of the ellipse.
333       */       */
334      public double getHeight()      public double getHeight()
335      {      {
# Line 318  public abstract class Ellipse2D extends Line 338  public abstract class Ellipse2D extends
338    
339      /**      /**
340       * Returns the width of the ellipse.       * Returns the width of the ellipse.
341         * @return The width of the ellipse.
342       */       */
343      public double getWidth()      public double getWidth()
344      {      {
# Line 327  public abstract class Ellipse2D extends Line 348  public abstract class Ellipse2D extends
348      /**      /**
349       * Returns x coordinate of the upper-left corner of       * Returns x coordinate of the upper-left corner of
350       * the ellipse's bounding-box.       * the ellipse's bounding-box.
351         * @return The x coordinate.
352       */       */
353      public double getX()      public double getX()
354      {      {
# Line 336  public abstract class Ellipse2D extends Line 358  public abstract class Ellipse2D extends
358      /**      /**
359       * Returns y coordinate of the upper-left corner of       * Returns y coordinate of the upper-left corner of
360       * the ellipse's bounding-box.       * the ellipse's bounding-box.
361         * @return The y coordinate.
362       */       */
363      public double getY()      public double getY()
364      {      {
# Line 343  public abstract class Ellipse2D extends Line 366  public abstract class Ellipse2D extends
366      }      }
367    
368      /**      /**
369       * Returns true if the ellipse encloses any area.       * Returns <code>true</code> if the ellipse encloses no area, and
370         * <code>false</code> otherwise.
371         *
372         * @return A boolean.
373       */       */
374      public boolean isEmpty()      public boolean isEmpty()
375      {      {
# Line 353  public abstract class Ellipse2D extends Line 379  public abstract class Ellipse2D extends
379      /**      /**
380       * Sets the geometry of the ellipse's bounding box.<P>       * Sets the geometry of the ellipse's bounding box.<P>
381       *       *
382       * @param x - x coordinate of the upper-right of the bounding rectangle       * @param x - x coordinate of the upper-left of the bounding rectangle
383       * @param y - y coordinate of the upper-right of the bounding rectangle       * @param y - y coordinate of the upper-left of the bounding rectangle
384       * @param w - width of the ellipse       * @param w - width of the ellipse
385       * @param h - height of the ellipse       * @param h - height of the ellipse
386       */       */
# Line 371  public abstract class Ellipse2D extends Line 397  public abstract class Ellipse2D extends
397       *       *
398       * Note: This leads to a loss of precision.<P>       * Note: This leads to a loss of precision.<P>
399       *       *
400       * @param x - x coordinate of the upper-right of the bounding rectangle       * @param x - x coordinate of the upper-left of the bounding rectangle
401       * @param y - y coordinate of the upper-right of the bounding rectangle       * @param y - y coordinate of the upper-left of the bounding rectangle
402       * @param w - width of the ellipse       * @param w - width of the ellipse
403       * @param h - height of the ellipse       * @param h - height of the ellipse
404       */       */

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26