2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / libjava / java / awt / geom / Area.java
blob85bc642cb222a86b63472266755ee5525733698d
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)
9 any later version.
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
19 02111-1307 USA.
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.
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;
44 /**
45 * STUBS ONLY
46 * XXX Implement and document.
48 public class Area implements Shape, Cloneable
50 public Area()
53 public Area(Shape s)
56 public void add(Area a)
58 // XXX Implement.
59 throw new Error("not implemented");
61 public void subtract(Area a)
63 // XXX Implement.
64 throw new Error("not implemented");
66 public void intersect(Area a)
68 // XXX Implement.
69 throw new Error("not implemented");
71 public void exclusiveOr(Area a)
73 // XXX Implement.
74 throw new Error("not implemented");
76 public void reset()
78 // XXX Implement.
79 throw new Error("not implemented");
81 public boolean isEmpty()
83 // XXX Implement.
84 throw new Error("not implemented");
86 public boolean isPolygonal()
88 // XXX Implement.
89 throw new Error("not implemented");
91 public boolean isRectangular()
93 // XXX Implement.
94 throw new Error("not implemented");
96 public boolean isSingular()
98 // XXX Implement.
99 throw new Error("not implemented");
101 public Rectangle2D getBounds2D()
103 // XXX Implement.
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
113 * this one.
115 * @return the clone
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)
131 // XXX Implement.
132 throw new Error("not implemented");
135 public void transform(AffineTransform at)
137 // XXX Implement.
138 throw new Error("not implemented");
140 public Area createTransformedArea(AffineTransform at)
142 Area a = (Area) clone();
143 a.transform(at);
144 return a;
146 public boolean contains(double x, double y)
148 // XXX Implement.
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)
157 // XXX Implement.
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)
167 // XXX Implement.
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)
176 // XXX Implement.
177 throw new Error("not implemented");
179 public PathIterator getPathIterator(AffineTransform at, double flatness)
181 return new FlatteningPathIterator(getPathIterator(at), flatness);
183 } // class Area