HotPixel constructor
HotPixel(
- Coordinate pt,
- double scaleFactor,
- LineIntersector li
Creates a new hot pixel, using a given scale factor. The scale factor must be strictly positive (non-zero).
@param pt the coordinate at the centre of the pixel @param scaleFactor the scaleFactor determining the pixel size. Must be > 0 @param li the intersector to use for testing intersection with line segments
Implementation
HotPixel(this.pt, this.scaleFactor, this.li) {
originalPt = pt;
this.scaleFactor = scaleFactor;
this.li = li;
//tolerance = 0.5;
if (scaleFactor <= 0) throw ArgumentError("Scale factor must be non-zero");
if (scaleFactor != 1.0) {
this.pt = new Coordinate(scale(pt.x), scale(pt.y));
p0Scaled = new Coordinate.empty2D();
p1Scaled = new Coordinate.empty2D();
}
initCorners(this.pt);
}