uk.me.parabola.mkgmap.general
Class AreaClipper
java.lang.Object
uk.me.parabola.mkgmap.general.AreaClipper
- All Implemented Interfaces:
- Clipper
public class AreaClipper
- extends java.lang.Object
- implements Clipper
Clip objects to a bounding box.
TODO: migrate LineClipper and PolygonClipper into here and simplify.
- Author:
- Steve Ratcliffe
Method Summary |
void |
clipLine(MapLine line,
LineAdder collector)
Clip a line and add the resulting line or lines (if any) to the
collector. |
void |
clipShape(MapShape shape,
MapCollector collector)
Clip a polygon and add the resulting shapes to the collector. |
boolean |
contains(Coord location)
'Clip' a point - return true if the point is within the clipped region. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AreaClipper
public AreaClipper(Area bbox)
clipLine
public void clipLine(MapLine line,
LineAdder collector)
- Description copied from interface:
Clipper
- Clip a line and add the resulting line or lines (if any) to the
collector.
- Specified by:
clipLine
in interface Clipper
clipShape
public void clipShape(MapShape shape,
MapCollector collector)
- Description copied from interface:
Clipper
- Clip a polygon and add the resulting shapes to the collector.
- Specified by:
clipShape
in interface Clipper
contains
public boolean contains(Coord location)
- Description copied from interface:
Clipper
- 'Clip' a point - return true if the point is within the clipped region.
- Specified by:
contains
in interface Clipper