SpectreCanvas
ClassFor examples and usage details, see the component documentation.
View SpectreCanvas ComponentNamespace:
RazorConsole.ComponentsAssembly:
RazorConsole.CoreDefinition
public class SpectreCanvas : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposableConstructors
1| Name | Type | Description |
|---|---|---|
SpectreCanvas() | Constructor | — |
Properties
6| Name | Type | Description |
|---|---|---|
Appearance | ||
CanvasHeight | Int32 | Height of the canvas in pixels. |
CanvasWidth | Int32 | Width of the canvas in pixels. |
MaxWidth | Nullable<Int32> | Maximum width of the rendered canvas in console characters. If null , no constraint is applied. |
PixelWidth | Int32 | Width of each pixel when rendered. Default is 2 characters, creating more square-looking pixels. |
Other | ||
Pixels | System.ValueTuple<System.Int32,System.Int32,Spectre.Console.Color>[] | Renders a pixel-based canvas for drawing graphics in the console using Spectre.Console's Canvas renderable. |
Scale | Boolean | Whether the canvas should automatically scale to fit the console. Default is false . |
Methods
4| Name | Type | Description |
|---|---|---|
BuildRenderTree(RenderTreeBuilder)() | Method | — |
Dispose() | Method | — |
OnInitialized() | Method | — |
OnParametersSet() | Method | — |