Table of Contents

Class CanvasPainter

Namespace
MiniTui
Assembly
MiniTui.dll

Passed to Paint(Action<CanvasPainter>). Shapes are drawn in call order (1.x spec §8.3).

public sealed class CanvasPainter
Inheritance
CanvasPainter
Inherited Members

Properties

DotHeight

The height of the dot grid: the canvas height times the marker's dots per cell.

public int DotHeight { get; }

Property Value

int

DotWidth

The width of the dot grid: the canvas width times the marker's dots per cell.

public int DotWidth { get; }

Property Value

int

Methods

Circle(double, double, double, Style)

A circle outline, the radius in coordinate units on both axes, so it looks round only when the bounds match the canvas's aspect.

public void Circle(double x, double y, double radius, Style style = default)

Parameters

x double
y double
radius double
style Style

Line(double, double, double, double, Style)

A line between two points. The part outside the bounds isn't drawn.

public void Line(double x1, double y1, double x2, double y2, Style style = default)

Parameters

x1 double
y1 double
x2 double
y2 double
style Style

Point(double, double, Style)

A dot. Points outside the bounds, NaN and infinite values aren't drawn.

public void Point(double x, double y, Style style = default)

Parameters

x double
y double
style Style

Points(IEnumerable<(double X, double Y)>, Style)

public void Points(IEnumerable<(double X, double Y)> points, Style style = default)

Parameters

points IEnumerable<(double X, double Y)>
style Style

Print(double, double, Line)

Text with its left end at the cell holding (x, y), drawn above the dots.

public void Print(double x, double y, Line text)

Parameters

x double
y double
text Line

Rectangle(double, double, double, double, Style)

A rectangle outline. (x, y) is its bottom-left corner.

public void Rectangle(double x, double y, double width, double height, Style style = default)

Parameters

x double
y double
width double
height double
style Style