Skip to content
ChartForgeX
Class

VisualCanvasTextLayer

ChartForgeX.Composition

Namespace
ChartForgeX.Composition
Assembly
ChartForgeX.Visuals
Modifiers
sealed

Plain text layer with either an explicit color or the canvas primary foreground.

Inheritance

Constructors

VisualCanvasTextLayer 2 overloads
public VisualCanvasTextLayer(double x, double y, double width, string text, double fontSize) #

Initializes a text layer that follows the canvas primary foreground at render time.

Parameters

x double required
The text X coordinate.
y double required
The text Y coordinate.
width double required
The text width used for alignment and clipping.
text string required
The text to render.
fontSize double required
The font size.
public VisualCanvasTextLayer(double x, double y, double width, string text, double fontSize, ChartColor color) #

Initializes a text layer with an explicit color, retained independently of the canvas theme.

Parameters

x double required
The text X coordinate.
y double required
The text Y coordinate.
width double required
The text width used for alignment and clipping.
text string required
The text to render.
fontSize double required
The font size.
color ChartForgeX.Primitives.ChartColor required
The explicit text color, including white or transparent.

Properties

public string Text { get; set; } #

Gets or sets the text.

public double FontSize { get; set; } #

Gets or sets the font size.

public ChartColor Color { get; set; } #

Gets the authored color, or white when none was supplied. Setting this property selects an explicit color; an uncolored layer renders with the canvas primary foreground.

public TextAlignment Alignment { get; set; } #

Gets or sets the text alignment.

public bool Emphasized { get; set; } #

Gets or sets whether the text should use the emphasized raster/SVG treatment.

public TextStyleOverride? TextStyle { get; set; } #

Gets or sets optional shared typography resolved over this layer's current font, size and color. Null keeps the legacy path.