Method TryClip
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
TryClip(DisplayBox, out double, out double, out double, out double)
Gets the part of the line inside a box, as the canvas draws it in the view: an XLINE level through (200, 300) in the box from (500, 290) to (510, 310) is the segment from (500, 300) to (510, 300). The ends run the way the line does.
public bool TryClip(DisplayBox box, out double x0, out double y0, out double x1, out double y1)
Parameters
boxDisplayBoxThe box.
x0doubleThe X of the start of the part.
y0doubleThe Y of the start of the part.
x1doubleThe X of the end of the part.
y1doubleThe Y of the end of the part.
Returns
- bool
True when the line meets the box; false, the ends nought, when it passes by.