Class LineCanvas
Facilitates box drawing and line intersection detection
and rendering. Does not support diagonal lines.
Inherited Members
Namespace: Terminal.Gui.Graphs
Assembly: Terminal.Gui.dll
Syntax
public class LineCanvas
Methods
| Edit this page View SourceAddLine(Point, int, Orientation, BorderStyle)
Add a new line to the canvas starting at
from.
Use positive length for Right and negative for Left
when Orientation is Horizontal.
Use positive length for Down and negative for Up
when Orientation is Vertical.Declaration
public void AddLine(Point from, int length, Orientation orientation, BorderStyle style)
Parameters
| Type | Name | Description |
|---|---|---|
| Point | from | Starting point. |
| int | length | Length of line. 0 for a dot. Positive for Down/Right. Negative for Up/Left. |
| Orientation | orientation | Direction of the line. |
| BorderStyle | style | The style of line to use |
GenerateImage(Rect)
Evaluate all currently defined lines that lie within
inArea and map that
shows what characters (if any) should be rendered at each
point so that all lines connect up correctly with appropriate
intersection symbols.
Declaration
public Dictionary<Point, Rune> GenerateImage(Rect inArea)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | inArea |
Returns
| Type | Description |
|---|---|
| Dictionary<Point, Rune> | Mapping of all the points within inArea to
line or intersection runes which should be drawn there. |