|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.geometry.Polyline
public class Polyline
A single, DoubleBuffer-based polyline.
| Field Summary | |
|---|---|
DoubleBuffer |
coords
|
| Constructor Summary | |
|---|---|
Polyline()
|
|
Polyline(DoubleBuffer buffy)
|
|
Polyline(int size)
|
|
| Method Summary | |
|---|---|
void |
addPoint(double x,
double y)
|
void |
clear()
|
PolylineArray |
clipOutRectangle(double x,
double y,
double width,
double height)
Clips a rectangle out of the polyline to a rectangle, producing zero or more resultant polylines that are outside the rectangle. |
PolylineArray |
clipOutRectangle(Rectangle rectangle)
|
void |
clipOutRectangle(Rectangle rectangle,
PolylineArray results)
This is the fastest public clipOutRectangle variation - passing a reuseable PolylineArray can reduce allocation overhead. |
PolylineArray |
clipOutRectangles(Rectangle[] rectangles)
Cuts a collection of rectangular holes out. |
java.lang.Object |
clone()
|
static boolean |
containsDegenerateSegments(DoubleBuffer coords)
|
Point |
getCentroid()
|
Rectangle |
getExtents()
|
double |
getLength()
|
int |
getNumberOfPoints()
|
boolean |
isDegenerate()
|
static boolean |
isDegenerate(DoubleBuffer coords)
|
void |
reduceDetail(double granularity)
|
static void |
reduceDetail(DoubleBuffer coords,
double granularity)
Attempts to reduce the complexity of the line by eliminating points which add nothing to the detail at a certain granularity. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public DoubleBuffer coords
| Constructor Detail |
|---|
public Polyline()
public Polyline(int size)
public Polyline(DoubleBuffer buffy)
| Method Detail |
|---|
public void addPoint(double x,
double y)
public final void reduceDetail(double granularity)
public int getNumberOfPoints()
public void clear()
public static final void reduceDetail(DoubleBuffer coords,
double granularity)
public final boolean isDegenerate()
public static final boolean isDegenerate(DoubleBuffer coords)
public static final boolean containsDegenerateSegments(DoubleBuffer coords)
public final Point getCentroid()
public final double getLength()
public final Rectangle getExtents()
public final PolylineArray clipOutRectangle(double x,
double y,
double width,
double height)
public final PolylineArray clipOutRectangle(Rectangle rectangle)
public final void clipOutRectangle(Rectangle rectangle,
PolylineArray results)
public final PolylineArray clipOutRectangles(Rectangle[] rectangles)
public java.lang.Object clone()
clone in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||