Method AddLine
AddLine(Point, int, Orientation, LineStyle, Attribute?)
Adds a new length long line to the canvas starting at start.
Use positive length for the line to extend Right and negative for Left when
Orientation is Horizontal.
Use positive length for the line to extend Down and negative for Up when
Orientation is Vertical.
public void AddLine(Point start, int length, Orientation orientation, LineStyle style, Attribute? attribute = null)
Parameters
startPointStarting point.
lengthintThe length of line. 0 for an intersection (cross or T). Positive for Down/Right. Negative for Up/Left.
orientationOrientationThe direction of the line.
styleLineStyleThe style of line to use.
attributeAttribute?The color attribute for the line, or null to inherit.
Remarks
None has no special handling inside LineCanvas. A line added with None is stored and participates in intersection resolution like any other line; because None does not match any styled-glyph check, it falls through to the default glyphs and renders identically to Single.
To erase geometry, do not add a None line. Instead, use Exclude(IEnumerable<StraightLine>, Point, int, Orientation) to physically split or remove overlapping lines from the Lines collection. To suppress output without removing geometry (e.g., for a title label), use Exclude(Region). To claim positions during multi-canvas compositing, use Reserve(Rectangle).
See the Drawing Deep Dive for a detailed comparison of None, Exclude(Region), and Reserve(Rectangle).
AddLine(StraightLine)
Adds a new line to the canvas
public void AddLine(StraightLine line)
Parameters
lineStraightLine