Class CanvasBuilder
- Namespace
- MiniTui
- Assembly
- MiniTui.dll
A drawing surface in app coordinates: x grows to the right and y grows upward (1.x spec §8.3). Shapes are passed to Paint(Action<CanvasPainter>), which runs on every draw.
public sealed class CanvasBuilder
- Inheritance
-
CanvasBuilder
- Inherited Members
Methods
Block(BlockBuilder)
Draw a block around the canvas.
public CanvasBuilder Block(BlockBuilder block)
Parameters
blockBlockBuilder
Returns
Draw(Buffer, Rect)
Draw the canvas.
public void Draw(Buffer buf, Rect area)
Parameters
Marker(Marker)
How dots are drawn. Default Braille.
public CanvasBuilder Marker(Marker marker)
Parameters
markerMarker
Returns
Paint(Action<CanvasPainter>)
Draws the shapes. The painter is only valid during the call.
public CanvasBuilder Paint(Action<CanvasPainter> paint)
Parameters
paintAction<CanvasPainter>
Returns
Style(Style)
A style patched over the theme's text style, for the background and for dots without a style.
public CanvasBuilder Style(Style style)
Parameters
styleStyle
Returns
XBounds(double, double)
The x values at the left and right edges. Default 0 to 1.
public CanvasBuilder XBounds(double min, double max)
Parameters
Returns
YBounds(double, double)
The y values at the bottom and top edges. Default 0 to 1.
public CanvasBuilder YBounds(double min, double max)