public class HotPixel extends Object
The hot pixel operations are all computed in the integer domain to avoid rounding problems.
| Constructor and Description |
|---|
HotPixel(Coordinate
Creates a new hot pixel, using a given scale factor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addSnappedNode(NodedSegmentString
Adds a new node (equal to the snap pt) to the specified segment if the segment passes through the hot pixel
|
Coordinate |
getCoordinate()
Gets the coordinate this hot pixel is based at.
|
Envelope |
getSafeEnvelope()
Returns a "safe" envelope that is guaranteed to contain the hot pixel.
|
boolean |
intersects(Coordinate
Tests whether the line segment (p0-p1) intersects this hot pixel.
|
public HotPixel(Coordinatept, double scaleFactor, LineIntersector li)
pt - the coordinate at the centre of the pixel
scaleFactor - the scaleFactor determining the pixel size. Must be > 0
li - the intersector to use for testing intersection with line segments
public CoordinategetCoordinate()
public EnvelopegetSafeEnvelope()
public boolean intersects(Coordinatep0, Coordinate p1)
p0 - the first coordinate of the line segment to test
p1 - the second coordinate of the line segment to test
public boolean addSnappedNode(NodedSegmentStringsegStr, int segIndex)
segStr -
segIndex -