Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (22 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libjava/java/awt/geom/Ellipse2D.java

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    1 /* Copyright (C) 2000, 2002  Free Software Foundation
     1/* Ellipse2D.java -- represents an ellipse in 2-D space
     2   Copyright (C) 2000, 2002 Free Software Foundation
    23
    34This file is part of GNU Classpath.
     
    3940/**
    4041 * @author Tom Tromey <[email protected]>
    41  * @date April 16, 2000
     42 * @author Eric Blake <[email protected]>
     43 * @since 1.2
     44 * @status still needs documentation
    4245 */
    43 
    4446public abstract class Ellipse2D extends RectangularShape
    4547{
    46   protected Ellipse2D ()
    47   {
    48   }
    49 
    50   public boolean contains (double x, double y)
    51   {
    52     double rx = getWidth () / 2;
    53     double ry = getHeight () / 2;
    54     double tx = (x - getCenterX ()) / rx;
    55     double ty = (y - getCenterY ()) / ry;
     48  protected Ellipse2D()
     49  {
     50  }
     51
     52  public boolean contains(double x, double y)
     53  {
     54    double rx = getWidth() / 2;
     55    double ry = getHeight() / 2;
     56    double tx = (x - getCenterX()) / rx;
     57    double ty = (y - getCenterY()) / ry;
    5658    return tx * tx + ty * ty <= 1.0;
    5759  }
    5860
    59   public boolean contains (double x, double y, double w, double h)
     61  public boolean contains(double x, double y, double w, double h)
    6062  {
    6163    double x2 = x + w;
    6264    double y2 = y + h;
    63     return (contains (x, y) && contains (x, y2)
    64             && contains (x2, y) && contains (x2, y2));
    65   }
    66 
    67   public PathIterator getPathIterator (AffineTransform at)
    68   {
    69     // fixme;
    70     return null;
    71   }
    72 
    73   public boolean intersects (double x, double y, double w, double h)
     65    return (contains(x, y2)
     66(x2, y2));
     67  }
     68
     69  public PathIterator getPathIterator(AffineTransform at)
     70  {
     71    //
     72    return n;
     73  }
     74
     75  public boolean intersects(double x, double y, double w, double h)
    7476  {
    7577    // fixme
     
    8486    public double y;
    8587
    86     public Double ()
    87     {
    88       height = width = x = y = 0;
    89     }
    90 
    91     public Double (double x, double y, double w, double h)
    92     {
    93       this.x = x;
    94       this.y = y;
    95       this.height = h;
    96       this.width = w;
    97     }
    98 
    99     public Rectangle2D getBounds2D ()
    100     {
    101       return new Rectangle2D.Double (x, y, width, height);
    102     }
    103 
    104     public double getHeight ()
     88    public Double()
     89    {
     90    }
     91
     92    public Double(double x, double y, double w, double h)
     93    {
     94      this.x = x;
     95      this.y = y;
     96      height = h;
     97      width = w;
     98    }
     99
     100    public Rectangle2D getBounds2D()
     101    {
     102      return new Rectangle2D.Double(x, y, width, height);
     103    }
     104
     105    public double getHeight()
    105106    {
    106107      return height;
    107108    }
    108109
    109     public double getWidth ()
     110    public double getWidth()
    110111    {
    111112      return width;
    112113    }
    113114
    114     public double getX ()
     115    public double getX()
    115116    {
    116117      return x;
    117118    }
    118119
    119     public double getY ()
     120    public double getY()
    120121    {
    121122      return y;
    122123    }
    123124
    124     public boolean isEmpty ()
     125    public boolean isEmpty()
    125126    {
    126127      return height <= 0 || width <= 0;
    127128    }
    128129
    129     public void setFrame (double x, double y, double w, double h)
    130     {
    131       this.x = x;
    132       this.y = y;
    133       this.height = h;
    134       this.width = w;
    135     }
    136   }
     130    public void setFrame(double x, double y, double w, double h)
     131    {
     132      this.x = x;
     133      this.y = y;
     134      height = h;
     135      width = w;
     136    }
     137  }
    137138
    138139  public static class Float extends Ellipse2D
     
    143144    public float y;
    144145
    145     public Float ()
    146     {
    147       height = width = x = y = 0;
    148     }
    149 
    150     public Float (float x, float y, float w, float h)
     146    public Float()
     147    {
     148    }
     149
     150    public Float(float x, float y, float w, float h)
    151151    {
    152152      this.x = x;
     
    156156    }
    157157
    158     public Rectangle2D getBounds2D ()
    159     {
    160       return new Rectangle2D.Float (x, y, width, height);
    161     }
    162 
    163     public double getHeight ()
     158    public Rectangle2D getBounds2D()
     159    {
     160      return new Rectangle2D.Float(x, y, width, height);
     161    }
     162
     163    public double getHeight()
    164164    {
    165165      return height;
    166166    }
    167167
    168     public double getWidth ()
     168    public double getWidth()
    169169    {
    170170      return width;
    171171    }
    172172
    173     public double getX ()
     173    public double getX()
    174174    {
    175175      return x;
    176176    }
    177177
    178     public double getY ()
     178    public double getY()
    179179    {
    180180      return y;
    181181    }
    182182
    183     public boolean isEmpty ()
     183    public boolean isEmpty()
    184184    {
    185185      return height <= 0 || width <= 0;
    186186    }
    187187
    188     public void setFrame (float x, float y, float w, float h)
    189     {
    190       this.x = x;
    191       this.y = y;
    192       this.height = h;
    193       this.width = w;
    194     }
    195 
    196     public void setFrame (double x, double y, double w, double h)
     188    public void setFrame(float x, float y, float w, float h)
     189    {
     190      this.x = x;
     191      this.y = y;
     192      height = h;
     193      width = w;
     194    }
     195
     196    public void setFrame(double x, double y, double w, double h)
    197197    {
    198198      this.x = (float) x;
    199199      this.y = (float) y;
    200       this.height = (float) h;
    201       this.width = (float) w;
    202     }
    203   }
    204 }
     200      height = (float) h;
     201      width = (float) w;
     202    }
     203  }
     204}
Note: See TracChangeset for help on using the changeset viewer.