Class
HalfBlockCanvas
ConsoleMonster.Canvas
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(int columns, int rows) #Creates a half-block canvas.
Parameters
- columns int
- Width in cells.
- rows int
- Height in cells.
Methods
public override void Render(Region region, int x, int y, RenderContext context) #Renders the canvas into a region at a local position.
Parameters
- region ConsoleMonster.Canvas.Region
- The region.
- x int
- Local column.
- y int
- Local row.
- context ConsoleMonster.Canvas.RenderContext
- The render context.
public override void Set(int x, int y, Color color) #Sets a pixel. Out-of-range pixels are ignored.
Parameters
- x int
- Pixel column (0 = left).
- y int
- 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 void Line(int x0, int y0, int x1, int y1, Color color) #Inherited from PixelCanvas
Parameters
- x0 int
- y0 int
- x1 int
- y1 int
- color Color
public void VerticalSpan(int x, int yTop, int yBottom, Color color) #Inherited from PixelCanvas
Parameters
- x int
- yTop int
- yBottom int
- color Color