Methods Summary |
---|
public void | add(java.awt.geom.Area area)Adds the specified area to this area.
throw new RuntimeException("Not implemented"); //$NON-NLS-1$
|
public java.lang.Object | clone()
return new Area(this);
|
public boolean | contains(double x, double y)
return s == null ? false : s.contains(x, y);
|
public boolean | contains(double x, double y, double width, double height)
return s == null ? false : s.contains(x, y, width, height);
|
public boolean | contains(java.awt.geom.Point2D p)
if (p == null) {
throw new NullPointerException();
}
return s == null ? false : s.contains(p);
|
public boolean | contains(java.awt.geom.Rectangle2D r)
if (r == null) {
throw new NullPointerException();
}
return s == null ? false : s.contains(r);
|
public java.awt.geom.Area | createTransformedArea(java.awt.geom.AffineTransform t)Creates a new Area that is the result of transforming the data of this
Area according to the specified AffineTransform.
return s == null ? new Area() : new Area(t.createTransformedShape(s));
|
public boolean | equals(java.awt.geom.Area obj)Tests whether the object is equal to this Area.
throw new RuntimeException("Not implemented"); //$NON-NLS-1$
|
public void | exclusiveOr(java.awt.geom.Area area)Performs an exclusive or operation between this shape and the specified
shape.
throw new RuntimeException("Not implemented"); //$NON-NLS-1$
|
java.awt.geom.Rectangle2D | extractRectangle()Extracts a Rectangle2D from the source shape if the underlying shape data
describes a rectangle.
if (s == null) {
return null;
}
float[] points = new float[12];
int count = 0;
PathIterator p = s.getPathIterator(null);
float[] coords = new float[6];
while (!p.isDone()) {
int type = p.currentSegment(coords);
if (count > 12 || type == PathIterator.SEG_QUADTO || type == PathIterator.SEG_CUBICTO) {
return null;
}
points[count++] = coords[0];
points[count++] = coords[1];
p.next();
}
if (points[0] == points[6] && points[6] == points[8] && points[2] == points[4]
&& points[1] == points[3] && points[3] == points[9] && points[5] == points[7]) {
return new Rectangle2D.Float(points[0], points[1], points[2] - points[0], points[7]
- points[1]);
}
return null;
|
public java.awt.Rectangle | getBounds()
return s == null ? new Rectangle() : s.getBounds();
|
public java.awt.geom.Rectangle2D | getBounds2D()
return s == null ? new Rectangle2D.Double() : s.getBounds2D();
|
public java.awt.geom.PathIterator | getPathIterator(java.awt.geom.AffineTransform t)
return s == null ? new NullIterator() : s.getPathIterator(t);
|
public java.awt.geom.PathIterator | getPathIterator(java.awt.geom.AffineTransform t, double flatness)
return s == null ? new NullIterator() : s.getPathIterator(t, flatness);
|
public void | intersect(java.awt.geom.Area area)Reduces the size of this Area by intersecting it with the specified Area
if they are both rectangles.
Rectangle2D src1 = extractRectangle();
Rectangle2D src2 = area.extractRectangle();
if (src1 != null && src2 != null) {
Rectangle2D.intersect(src1, src2, (Rectangle2D)s);
}
|
public boolean | intersects(double x, double y, double width, double height)
return s == null ? false : s.intersects(x, y, width, height);
|
public boolean | intersects(java.awt.geom.Rectangle2D r)
if (r == null) {
throw new NullPointerException();
}
return s == null ? false : s.intersects(r);
|
public boolean | isEmpty()Checks if this Area is empty.
throw new RuntimeException("Not implemented"); //$NON-NLS-1$
|
public boolean | isPolygonal()Checks if this Area is polygonal.
throw new RuntimeException("Not implemented"); //$NON-NLS-1$
|
public boolean | isRectangular()Checks if this Area is rectangular.
throw new RuntimeException("Not implemented"); //$NON-NLS-1$
|
public boolean | isSingular()Checks if this Area is singular.
throw new RuntimeException("Not implemented"); //$NON-NLS-1$
|
public void | reset()Resets the data of this Area.
throw new RuntimeException("Not implemented"); //$NON-NLS-1$
|
public void | subtract(java.awt.geom.Area area)Subtract the specified area from this area.
throw new RuntimeException("Not implemented"); //$NON-NLS-1$
|
public void | transform(java.awt.geom.AffineTransform t)Transforms the data of this Area according to the specified
AffineTransform.
s = t.createTransformedShape(s);
|