summaryrefslogtreecommitdiff
path: root/libjava/java/awt/geom
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/awt/geom')
-rw-r--r--libjava/java/awt/geom/Arc2D.java5
-rw-r--r--libjava/java/awt/geom/Area.java23
-rw-r--r--libjava/java/awt/geom/GeneralPath.java23
3 files changed, 33 insertions, 18 deletions
diff --git a/libjava/java/awt/geom/Arc2D.java b/libjava/java/awt/geom/Arc2D.java
index 5ce3b08e82f..2cdc17080db 100644
--- a/libjava/java/awt/geom/Arc2D.java
+++ b/libjava/java/awt/geom/Arc2D.java
@@ -73,8 +73,9 @@ public abstract class Arc2D extends RectangularShape
*/
public static final int PIE = 2;
- /** The closure type of this arc. */
- private int type;
+ /** The closure type of this arc. This is package-private to avoid an
+ * accessor method. */
+ int type;
/**
* Create a new arc, with the specified closure type.
diff --git a/libjava/java/awt/geom/Area.java b/libjava/java/awt/geom/Area.java
index 68f905f08f4..782552940f9 100644
--- a/libjava/java/awt/geom/Area.java
+++ b/libjava/java/awt/geom/Area.java
@@ -89,13 +89,15 @@ public class Area implements Shape, Cloneable
/**
* Segment vectors containing solid areas and holes
+ * This is package-private to avoid an accessor method.
*/
- private Vector solids;
+ Vector solids;
/**
* Segment vectors containing solid areas and holes
+ * This is package-private to avoid an accessor method.
*/
- private Vector holes;
+ Vector holes;
/**
* Vector (temporary) storing curve-curve intersections
@@ -1315,9 +1317,10 @@ public class Area implements Shape, Cloneable
* This is a reasonably accurate method, although the recursion depth
* is typically around 20, the bounding-box tests allow for significant
* pruning of the subdivision tree.
+ *
+ * This is package-private to avoid an accessor method.
*/
- private Intersection[] cubicCubicIntersect(CubicSegment curve1,
- CubicSegment curve2)
+ Intersection[] cubicCubicIntersect(CubicSegment curve1, CubicSegment curve2)
{
Rectangle2D r1 = curve1.getBounds();
Rectangle2D r2 = curve2.getBounds();
@@ -1349,8 +1352,9 @@ public class Area implements Shape, Cloneable
* Or null if no intersections are found1
* This is done through combining the line's equation with the
* parametric form of the Bezier and solving the resulting quadratic.
+ * This is package-private to avoid an accessor method.
*/
- private Intersection[] lineQuadIntersect(LineSegment l, QuadSegment c)
+ Intersection[] lineQuadIntersect(LineSegment l, QuadSegment c)
{
double[] y = new double[3];
double[] x = new double[3];
@@ -1453,8 +1457,9 @@ public class Area implements Shape, Cloneable
* Returns the intersections between a line and a cubic segment
* This is done through combining the line's equation with the
* parametric form of the Bezier and solving the resulting quadratic.
+ * This is package-private to avoid an accessor method.
*/
- private Intersection[] lineCubicIntersect(LineSegment l, CubicSegment c)
+ Intersection[] lineCubicIntersect(LineSegment l, CubicSegment c)
{
double[] y = new double[4];
double[] x = new double[4];
@@ -1560,8 +1565,9 @@ public class Area implements Shape, Cloneable
/**
* Returns the intersection between two lines, or null if there is no
* intersection.
+ * This is package-private to avoid an accessor method.
*/
- private Intersection linesIntersect(LineSegment a, LineSegment b)
+ Intersection linesIntersect(LineSegment a, LineSegment b)
{
Point2D P1 = a.P1;
Point2D P2 = a.P2;
@@ -1605,8 +1611,9 @@ public class Area implements Shape, Cloneable
/**
* Determines if two points are equal, within an error margin
* 'snap distance'
+ * This is package-private to avoid an accessor method.
*/
- private boolean pointEquals(Point2D a, Point2D b)
+ boolean pointEquals(Point2D a, Point2D b)
{
return (a.equals(b) || a.distance(b) < PE_EPSILON);
}
diff --git a/libjava/java/awt/geom/GeneralPath.java b/libjava/java/awt/geom/GeneralPath.java
index 0dc9ede2942..70f7de7dfc9 100644
--- a/libjava/java/awt/geom/GeneralPath.java
+++ b/libjava/java/awt/geom/GeneralPath.java
@@ -88,15 +88,18 @@ public final class GeneralPath implements Shape, Cloneable
/** A big number, but not so big it can't survive a few float operations */
private static final double BIG_VALUE = java.lang.Double.MAX_VALUE / 10.0;
- /** The winding rule. */
- private int rule;
+ /** The winding rule.
+ * This is package-private to avoid an accessor method.
+ */
+ int rule;
/**
* The path type in points. Note that xpoints[index] and ypoints[index] maps
* to types[index]; the control points of quad and cubic paths map as
* well but are ignored.
+ * This is package-private to avoid an accessor method.
*/
- private byte[] types;
+ byte[] types;
/**
* The list of all points seen. Since you can only append floats, it makes
@@ -104,15 +107,18 @@ public final class GeneralPath implements Shape, Cloneable
* allow a general path of double precision points.
* Note: Storing x and y coords seperately makes for a slower transforms,
* But it speeds up and simplifies box-intersection checking a lot.
+ * These are package-private to avoid accessor methods.
*/
- private float[] xpoints;
- private float[] ypoints;
+ float[] xpoints;
+ float[] ypoints;
/** The index of the most recent moveto point, or null. */
private int subpath = -1;
- /** The next available index into points. */
- private int index;
+ /** The next available index into points.
+ * This is package-private to avoid an accessor method.
+ */
+ int index;
/**
* Constructs a GeneralPath with the default (NON_ZERO)
@@ -534,8 +540,9 @@ public final class GeneralPath implements Shape, Cloneable
/**
* The GeneralPath whose segments are being iterated.
+ * This is package-private to avoid an accessor method.
*/
- private final GeneralPath path;
+ final GeneralPath path;
/**
* The affine transformation used to transform coordinates.