1 /* Area.java -- represents a shape built by constructive area geometry
2 Copyright (C) 2002 Free Software Foundation
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package java
.awt
.geom
;
41 import java
.awt
.Rectangle
;
42 import java
.awt
.Shape
;
46 * XXX Implement and document.
48 public class Area
implements Shape
, Cloneable
56 public void add(Area a
)
59 throw new Error("not implemented");
61 public void subtract(Area a
)
64 throw new Error("not implemented");
66 public void intersect(Area a
)
69 throw new Error("not implemented");
71 public void exclusiveOr(Area a
)
74 throw new Error("not implemented");
79 throw new Error("not implemented");
81 public boolean isEmpty()
84 throw new Error("not implemented");
86 public boolean isPolygonal()
89 throw new Error("not implemented");
91 public boolean isRectangular()
94 throw new Error("not implemented");
96 public boolean isSingular()
99 throw new Error("not implemented");
101 public Rectangle2D
getBounds2D()
104 throw new Error("not implemented");
106 public Rectangle
getBounds()
108 return getBounds2D().getBounds();
112 * Create a new area of the same run-time type with the same contents as
117 public Object
clone()
121 return super.clone();
123 catch (CloneNotSupportedException e
)
125 throw (Error
) new InternalError().initCause(e
); // Impossible
129 public boolean equals(Area a
)
132 throw new Error("not implemented");
135 public void transform(AffineTransform at
)
138 throw new Error("not implemented");
140 public Area
createTransformedArea(AffineTransform at
)
142 Area a
= (Area
) clone();
146 public boolean contains(double x
, double y
)
149 throw new Error("not implemented");
151 public boolean contains(Point2D p
)
153 return contains(p
.getX(), p
.getY());
155 public boolean contains(double x
, double y
, double w
, double h
)
158 throw new Error("not implemented");
160 public boolean contains(Rectangle2D r
)
162 return contains(r
.getX(), r
.getY(), r
.getWidth(), r
.getHeight());
165 public boolean intersects(double x
, double y
, double w
, double h
)
168 throw new Error("not implemented");
170 public boolean intersects(Rectangle2D r
)
172 return intersects(r
.getX(), r
.getY(), r
.getWidth(), r
.getHeight());
174 public PathIterator
getPathIterator(AffineTransform at
)
177 throw new Error("not implemented");
179 public PathIterator
getPathIterator(AffineTransform at
, double flatness
)
181 return new FlatteningPathIterator(getPathIterator(at
), flatness
);