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

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

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

revision 1.3 by ericb, Thu Mar 21 07:58:00 2002 UTC revision 1.4 by ericb, Fri Mar 22 16:54:31 2002 UTC
# Line 653  public abstract class Line2D implements Line 653  public abstract class Line2D implements
653     */     */
654    public Rectangle getBounds()    public Rectangle getBounds()
655    {    {
656      double x1 = getX1();      return getBounds2D().getBounds();
     double y1 = getY1();  
     double x2 = getX2();  
     double y2 = getY2();  
     double minx = Math.floor(Math.min(x1, x2));  
     double miny = Math.floor(Math.min(y1, y2));  
     double maxx = Math.ceil(Math.max(x1, x2));  
     double maxy = Math.ceil(Math.max(y1, y2));  
     return new Rectangle((int) minx, (int) miny,  
                          (int) (maxx - minx), (int) (maxy - miny));  
657    }    }
658    
659    /**    /**
# Line 681  public abstract class Line2D implements Line 672  public abstract class Line2D implements
672    
673        public int getWindingRule()        public int getWindingRule()
674        {        {
675          return WIND_EVEN_ODD;          return WIND_NON_ZERO;
676        }        }
677    
678        public boolean isDone()        public boolean isDone()

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

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