1 | /* Area.java -- represents a shape built by constructive area geometry
|
---|
2 | Copyright (C) 2002 Free Software Foundation
|
---|
3 |
|
---|
4 | This file is part of GNU Classpath.
|
---|
5 |
|
---|
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)
|
---|
9 | any later version.
|
---|
10 |
|
---|
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.
|
---|
15 |
|
---|
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
|
---|
19 | 02111-1307 USA.
|
---|
20 |
|
---|
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
|
---|
24 | combination.
|
---|
25 |
|
---|
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. */
|
---|
37 |
|
---|
38 |
|
---|
39 | package java.awt.geom;
|
---|
40 |
|
---|
41 | import java.awt.Rectangle;
|
---|
42 | import java.awt.Shape;
|
---|
43 |
|
---|
44 | /**
|
---|
45 | * STUBS ONLY
|
---|
46 | * XXX Implement and document.
|
---|
47 | */
|
---|
48 | public class Area implements Shape, Cloneable
|
---|
49 | {
|
---|
50 | public Area()
|
---|
51 | {
|
---|
52 | }
|
---|
53 | public Area(Shape s)
|
---|
54 | {
|
---|
55 | }
|
---|
56 | public void add(Area a)
|
---|
57 | {
|
---|
58 | // XXX Implement.
|
---|
59 | throw new Error("not implemented");
|
---|
60 | }
|
---|
61 | public void subtract(Area a)
|
---|
62 | {
|
---|
63 | // XXX Implement.
|
---|
64 | throw new Error("not implemented");
|
---|
65 | }
|
---|
66 | public void intersect(Area a)
|
---|
67 | {
|
---|
68 | // XXX Implement.
|
---|
69 | throw new Error("not implemented");
|
---|
70 | }
|
---|
71 | public void exclusiveOr(Area a)
|
---|
72 | {
|
---|
73 | // XXX Implement.
|
---|
74 | throw new Error("not implemented");
|
---|
75 | }
|
---|
76 | public void reset()
|
---|
77 | {
|
---|
78 | // XXX Implement.
|
---|
79 | throw new Error("not implemented");
|
---|
80 | }
|
---|
81 | public boolean isEmpty()
|
---|
82 | {
|
---|
83 | // XXX Implement.
|
---|
84 | throw new Error("not implemented");
|
---|
85 | }
|
---|
86 | public boolean isPolygonal()
|
---|
87 | {
|
---|
88 | // XXX Implement.
|
---|
89 | throw new Error("not implemented");
|
---|
90 | }
|
---|
91 | public boolean isRectangular()
|
---|
92 | {
|
---|
93 | // XXX Implement.
|
---|
94 | throw new Error("not implemented");
|
---|
95 | }
|
---|
96 | public boolean isSingular()
|
---|
97 | {
|
---|
98 | // XXX Implement.
|
---|
99 | throw new Error("not implemented");
|
---|
100 | }
|
---|
101 | public Rectangle2D getBounds2D()
|
---|
102 | {
|
---|
103 | // XXX Implement.
|
---|
104 | throw new Error("not implemented");
|
---|
105 | }
|
---|
106 | public Rectangle getBounds()
|
---|
107 | {
|
---|
108 | return getBounds2D().getBounds();
|
---|
109 | }
|
---|
110 |
|
---|
111 | /**
|
---|
112 | * Create a new area of the same run-time type with the same contents as
|
---|
113 | * this one.
|
---|
114 | *
|
---|
115 | * @return the clone
|
---|
116 | */
|
---|
117 | public Object clone()
|
---|
118 | {
|
---|
119 | try
|
---|
120 | {
|
---|
121 | return super.clone();
|
---|
122 | }
|
---|
123 | catch (CloneNotSupportedException e)
|
---|
124 | {
|
---|
125 | throw (Error) new InternalError().initCause(e); // Impossible
|
---|
126 | }
|
---|
127 | }
|
---|
128 |
|
---|
129 | public boolean equals(Area a)
|
---|
130 | {
|
---|
131 | // XXX Implement.
|
---|
132 | throw new Error("not implemented");
|
---|
133 | }
|
---|
134 |
|
---|
135 | public void transform(AffineTransform at)
|
---|
136 | {
|
---|
137 | // XXX Implement.
|
---|
138 | throw new Error("not implemented");
|
---|
139 | }
|
---|
140 | public Area createTransformedArea(AffineTransform at)
|
---|
141 | {
|
---|
142 | Area a = (Area) clone();
|
---|
143 | a.transform(at);
|
---|
144 | return a;
|
---|
145 | }
|
---|
146 | public boolean contains(double x, double y)
|
---|
147 | {
|
---|
148 | // XXX Implement.
|
---|
149 | throw new Error("not implemented");
|
---|
150 | }
|
---|
151 | public boolean contains(Point2D p)
|
---|
152 | {
|
---|
153 | return contains(p.getX(), p.getY());
|
---|
154 | }
|
---|
155 | public boolean contains(double x, double y, double w, double h)
|
---|
156 | {
|
---|
157 | // XXX Implement.
|
---|
158 | throw new Error("not implemented");
|
---|
159 | }
|
---|
160 | public boolean contains(Rectangle2D r)
|
---|
161 | {
|
---|
162 | return contains(r.getX(), r.getY(), r.getWidth(), r.getHeight());
|
---|
163 | }
|
---|
164 |
|
---|
165 | public boolean intersects(double x, double y, double w, double h)
|
---|
166 | {
|
---|
167 | // XXX Implement.
|
---|
168 | throw new Error("not implemented");
|
---|
169 | }
|
---|
170 | public boolean intersects(Rectangle2D r)
|
---|
171 | {
|
---|
172 | return intersects(r.getX(), r.getY(), r.getWidth(), r.getHeight());
|
---|
173 | }
|
---|
174 | public PathIterator getPathIterator(AffineTransform at)
|
---|
175 | {
|
---|
176 | // XXX Implement.
|
---|
177 | throw new Error("not implemented");
|
---|
178 | }
|
---|
179 | public PathIterator getPathIterator(AffineTransform at, double flatness)
|
---|
180 | {
|
---|
181 | return new FlatteningPathIterator(getPathIterator(at), flatness);
|
---|
182 | }
|
---|
183 | } // class Area
|
---|