source: trunk/gcc/libjava/java/awt/geom/Area.java

Last change on this file was 1389, checked in by bird, 21 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 4.7 KB
Line 
1/* Area.java -- represents a shape built by constructive area geometry
2 Copyright (C) 2002 Free Software Foundation
3
4This file is part of GNU Classpath.
5
6GNU Classpath is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU Classpath is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Classpath; see the file COPYING. If not, write to the
18Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1902111-1307 USA.
20
21Linking this library statically or dynamically with other modules is
22making a combined work based on this library. Thus, the terms and
23conditions of the GNU General Public License cover the whole
24combination.
25
26As a special exception, the copyright holders of this library give you
27permission to link this library with independent modules to produce an
28executable, regardless of the license terms of these independent
29modules, and to copy and distribute the resulting executable under
30terms of your choice, provided that you also meet, for each linked
31independent module, the terms and conditions of the license of that
32module. An independent module is a module which is not derived from
33or based on this library. If you modify this library, you may extend
34this exception to your version of the library, but you are not
35obligated to do so. If you do not wish to do so, delete this
36exception statement from your version. */
37
38
39package java.awt.geom;
40
41import java.awt.Rectangle;
42import java.awt.Shape;
43
44/**
45 * STUBS ONLY
46 * XXX Implement and document.
47 */
48public 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
Note: See TracBrowser for help on using the repository browser.