|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.parabola.mkgmap.general.LineClipper
public class LineClipper
Routine to clip a polyline to a given bounding box.
Constructor Summary | |
---|---|
LineClipper()
|
Method Summary | |
---|---|
static Coord[] |
clip(Area a,
Coord[] ends)
A straight forward implementation of the Liang-Barsky algorithm as described in the referenced web page. |
static java.util.List<java.util.List<Coord>> |
clip(Area a,
java.util.List<Coord> coords)
Clips a polyline by the given bounding box. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LineClipper()
Method Detail |
---|
public static java.util.List<java.util.List<Coord>> clip(Area a, java.util.List<Coord> coords)
a
- The bounding area.coords
- A list of the points in the line.
public static Coord[] clip(Area a, Coord[] ends)
a
- The clipping area.ends
- The start and end of the line the contents of this will
be changed if the line is clipped to contain the new start and end
points. A point that was inside the box will not be changed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |