Class
VisualCanvasTextLayer
ChartForgeX.Composition
Plain text layer with either an explicit color or the canvas primary foreground.
Inheritance
- VisualCanvasLayer
- VisualCanvasTextLayer
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
- The text X coordinate.
- y double
- The text Y coordinate.
- width double
- The text width used for alignment and clipping.
- text string
- The text to render.
- fontSize double
- 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
- The text X coordinate.
- y double
- The text Y coordinate.
- width double
- The text width used for alignment and clipping.
- text string
- The text to render.
- fontSize double
- The font size.
- color ChartForgeX.Primitives.ChartColor
- The explicit text color, including white or transparent.
Inherited Methods
Properties
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.