API Reference
Class
HalfBlockCanvas
A canvas with 1x2 pixels per cell drawn with half blocks (▀ ▄ █). Each pixel keeps its own colour: when the two pixels of a cell differ, the upper one is the foreground and the lower one the background. Basic-tier fonts (Consolas, Lucida Console) can show it; it is also the renderer for pixel-art logos.
Inheritance
- PixelCanvas
- HalfBlockCanvas
Constructors
public HalfBlockCanvas(Int32 columns, Int32 rows) #Creates a half-block canvas.
Parameters
- columns System.Int32
- Width in cells.
- rows System.Int32
- Height in cells.
Methods
public override Void Render(Region region, Int32 x, Int32 y, RenderContext context) #Returns:
VoidRenders the canvas into a region at a local position.
Parameters
- region ConsoleMonster.Canvas.Region
- The region.
- x System.Int32
- Local column.
- y System.Int32
- Local row.
- context ConsoleMonster.Canvas.RenderContext
- The render context.
public override Void Set(Int32 x, Int32 y, Color color) #Returns:
VoidSets a pixel. Out-of-range pixels are ignored.
Parameters
- x System.Int32
- Pixel column (0 = left).
- y System.Int32
- Pixel row (0 = top).
- color ConsoleMonster.Styling.Color
- The colour; a cell shows the colour of the last pixel set in it.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?
public Void Line(Int32 x0, Int32 y0, Int32 x1, Int32 y1, Color color) #Returns:
VoidInherited from PixelCanvas
Parameters
- x0 Int32
- y0 Int32
- x1 Int32
- y1 Int32
- color Color
public Void VerticalSpan(Int32 x, Int32 yTop, Int32 yBottom, Color color) #Returns:
VoidInherited from PixelCanvas
Parameters
- x Int32
- yTop Int32
- yBottom Int32
- color Color