Canvas Class

Represents a renderable canvas.
public sealed class Canvas : Renderable, IRenderable
Namespace
Spectre.Console
Interfaces
Base Types

Constructors

Canvas(int, int)
Initializes a new instance of the Canvas class.

Properties

int Height
Gets the height of the canvas.
int? MaxWidth
Gets or sets the render width of the canvas.
int PixelWidth
Gets or sets the pixel width.
bool Scale
Gets or sets a value indicating whether or not to scale the canvas when rendering.
int Width
Gets the width of the canvas.

Methods

protected override Measurement Measure(RenderContext, int)
Measures the renderable object.
protected override IEnumerable<Segment> Render(RenderContext, int)
Renders the object.
Canvas SetPixel(int, int, Color)
Sets a pixel with the specified color in the canvas at the specified location.

Extension Methods

IEnumerable<Segment> GetSegments(IAnsiConsole)
Gets the segments for a renderable using the specified console.