Revision 46 trunk/libraries/libCq CMS for java.old/src/org/cresques/px/gml/Polygon.java
Polygon.java | ||
---|---|---|
43 | 43 |
extent.add(pt); |
44 | 44 |
} |
45 | 45 |
|
46 |
public Point2D get(int i) { |
|
47 |
if (outer) |
|
48 |
return (Point2D) outPol.get(i); |
|
49 |
return (Point2D) inPol.get(i); |
|
50 |
} |
|
46 | 51 |
public void remove(int i) { |
47 |
pointNr--; |
|
48 | 52 |
if (outer) |
49 | 53 |
outPol.remove(i); |
50 | 54 |
else |
51 | 55 |
inPol.remove(i); |
52 | 56 |
} |
53 |
|
|
54 |
public Point2D get(int i) { |
|
55 |
Point2D point = new Point2D.Double(); |
|
57 |
public int pointNr() { |
|
56 | 58 |
if (outer) |
57 |
point = (Point2D)outPol.get(i); |
|
58 |
else |
|
59 |
point = (Point2D)inPol.get(i); |
|
60 |
return point; |
|
59 |
return outPol.size(); |
|
60 |
return inPol.size(); |
|
61 | 61 |
} |
62 | 62 |
|
63 |
public int pointNr() { |
|
64 |
if (outer) return outPol.size(); |
|
65 |
else return inPol.size(); |
|
66 |
} |
|
67 |
|
|
68 | 63 |
public void setOuterBoundary() { outer=true; } |
69 | 64 |
public void setInnerBoundary() { outer=false; } |
70 | 65 |
|
Also available in: Unified diff