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

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

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

revision 1.1.2.4 by gnu_andrew, Sun Jan 16 15:15:11 2005 UTC revision 1.1.2.5 by gnu_andrew, Thu Apr 28 23:00:12 2005 UTC
# Line 89  public class Area implements Shape, Clon Line 89  public class Area implements Shape, Clon
89    
90    /**    /**
91     * Segment vectors containing solid areas and holes     * Segment vectors containing solid areas and holes
92       * This is package-private to avoid an accessor method.
93     */     */
94    private Vector solids;    Vector solids;
95    
96    /**    /**
97     * Segment vectors containing solid areas and holes     * Segment vectors containing solid areas and holes
98       * This is package-private to avoid an accessor method.
99     */     */
100    private Vector holes;    Vector holes;
101    
102    /**    /**
103     * Vector (temporary) storing curve-curve intersections     * Vector (temporary) storing curve-curve intersections
# Line 1315  public class Area implements Shape, Clon Line 1317  public class Area implements Shape, Clon
1317     * This is a reasonably accurate method, although the recursion depth     * This is a reasonably accurate method, although the recursion depth
1318     * is typically around 20, the bounding-box tests allow for significant     * is typically around 20, the bounding-box tests allow for significant
1319     * pruning of the subdivision tree.     * pruning of the subdivision tree.
1320       *
1321       * This is package-private to avoid an accessor method.
1322     */     */
1323    private Intersection[] cubicCubicIntersect(CubicSegment curve1,    Intersection[] cubicCubicIntersect(CubicSegment curve1, CubicSegment curve2)
                                              CubicSegment curve2)  
1324    {    {
1325      Rectangle2D r1 = curve1.getBounds();      Rectangle2D r1 = curve1.getBounds();
1326      Rectangle2D r2 = curve2.getBounds();      Rectangle2D r2 = curve2.getBounds();
# Line 1349  public class Area implements Shape, Clon Line 1352  public class Area implements Shape, Clon
1352     * Or null if no intersections are found1     * Or null if no intersections are found1
1353     * This is done through combining the line's equation with the     * This is done through combining the line's equation with the
1354     * parametric form of the Bezier and solving the resulting quadratic.     * parametric form of the Bezier and solving the resulting quadratic.
1355       * This is package-private to avoid an accessor method.
1356     */     */
1357    private Intersection[] lineQuadIntersect(LineSegment l, QuadSegment c)    Intersection[] lineQuadIntersect(LineSegment l, QuadSegment c)
1358    {    {
1359      double[] y = new double[3];      double[] y = new double[3];
1360      double[] x = new double[3];      double[] x = new double[3];
# Line 1453  public class Area implements Shape, Clon Line 1457  public class Area implements Shape, Clon
1457     * Returns the intersections between a line and a cubic segment     * Returns the intersections between a line and a cubic segment
1458     * This is done through combining the line's equation with the     * This is done through combining the line's equation with the
1459     * parametric form of the Bezier and solving the resulting quadratic.     * parametric form of the Bezier and solving the resulting quadratic.
1460       * This is package-private to avoid an accessor method.
1461     */     */
1462    private Intersection[] lineCubicIntersect(LineSegment l, CubicSegment c)    Intersection[] lineCubicIntersect(LineSegment l, CubicSegment c)
1463    {    {
1464      double[] y = new double[4];      double[] y = new double[4];
1465      double[] x = new double[4];      double[] x = new double[4];
# Line 1560  public class Area implements Shape, Clon Line 1565  public class Area implements Shape, Clon
1565    /**    /**
1566     * Returns the intersection between two lines, or null if there is no     * Returns the intersection between two lines, or null if there is no
1567     * intersection.     * intersection.
1568       * This is package-private to avoid an accessor method.
1569     */     */
1570    private Intersection linesIntersect(LineSegment a, LineSegment b)    Intersection linesIntersect(LineSegment a, LineSegment b)
1571    {    {
1572      Point2D P1 = a.P1;      Point2D P1 = a.P1;
1573      Point2D P2 = a.P2;      Point2D P2 = a.P2;
# Line 1605  public class Area implements Shape, Clon Line 1611  public class Area implements Shape, Clon
1611    /**    /**
1612     * Determines if two points are equal, within an error margin     * Determines if two points are equal, within an error margin
1613     * 'snap distance'     * 'snap distance'
1614       * This is package-private to avoid an accessor method.
1615     */     */
1616    private boolean pointEquals(Point2D a, Point2D b)    boolean pointEquals(Point2D a, Point2D b)
1617    {    {
1618      return (a.equals(b) || a.distance(b) < PE_EPSILON);      return (a.equals(b) || a.distance(b) < PE_EPSILON);
1619    }    }

Legend:
Removed from v.1.1.2.4  
changed lines
  Added in v.1.1.2.5

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