SceneTextSpan Class
A part of a text with its own style (SceneText.Spans): what it does not set is the style of the text. The spans are drawn one after the other on the baseline of the text, unless they are moved (SceneTextSpan.X, SceneTextSpan.Y, SceneTextSpan.Dx, SceneTextSpan.Dy, SceneTextSpan.BaselineShift).
public sealed class SceneTextSpanExceptions
ArgumentNullExceptiontextisnull.
Constructors
| Name | Description |
|---|---|
| SceneTextSpan(string) | A part of a text with its own style (SceneText.Spans): what it does not set is the style of the text. The spans are drawn one after the other on the baseline of the text, unless they are moved (SceneTextSpan.X, SceneTextSpan.Y, SceneTextSpan.Dx, SceneTextSpan.Dy, SceneTextSpan.BaselineShift). |
SceneTextSpan(string)
SceneTextSpan.csA part of a text with its own style (SceneText.Spans): what it does not set is the style of the text. The spans are drawn one after the other on the baseline of the text, unless they are moved (SceneTextSpan.X, SceneTextSpan.Y, SceneTextSpan.Dx, SceneTextSpan.Dy, SceneTextSpan.BaselineShift).
public SceneTextSpan(string text)Properties
| Name | Description |
|---|---|
| BaselineShift | Gets how far the baseline of the span is raised above the baseline of the text, in pixels, as the SVG baseline-shift property: positive for a superscript, negative for a subscript. The default is 0; a value that is not finite is 0. |
| Color | Gets the color of the span, or null for the color of the text. |
| DecorationFill | Gets how the lines of the span are painted, or null for the paint of the lines of the text (SceneText.DecorationFill), and else the paint of the glyphs of the span. |
| Decorations | Gets the lines drawn with the span, or null for the lines of the text. |
| Dx | Gets the horizontal shift of the span, in pixels, as the dx attribute of an SVG tspan: the span and the spans that follow it move by this distance. On a path, the shift is along the path. The default is 0; a value that is not finite is 0. |
| Dy | Gets the vertical shift of the span, in pixels, as the dy attribute of an SVG tspan: the baseline of the span and of the spans that follow it moves down by this distance. On a path, the shift is across the path. The default is 0; a value that is not finite is 0. |
| Fill | Gets how the glyphs of the span are painted, or null for SceneTextSpan.Color when it is set, or else for the fill of the text (SceneText.Fill, then SceneText.Color). |
| Font | Gets the font of the span, or null for the font of the text. |
| GlyphRotation | Gets the rotation of each character of the span around its origin on the baseline, in degrees, clockwise, as a single value of the rotate attribute of an SVG tspan. The characters keep their advances. The default is 0; a value that is not finite is 0. |
| LetterSpacing | Gets the space added after each character of the span, or null for the spacing of the text (SceneText.LetterSpacing). |
| Stroke | Gets how the outline of the glyphs of the span is painted, or null for the outline of the text (SceneText.Stroke). |
| Text | Gets the characters of the span. |
| WordSpacing | Gets the space added to each space of the span, or null for the spacing of the text (SceneText.WordSpacing). |
| X | Gets the x coordinate the span starts at, as the x attribute of an SVG tspan, or null (the default) to start where the previous span ends. |
| Y | Gets the y coordinate of the baseline of the span and of the spans that follow it, as the y attribute of an SVG tspan, or null (the default) for the baseline of the previous span. |
BaselineShift
SceneTextSpan.csGets how far the baseline of the span is raised above the baseline of the text, in pixels, as the SVG baseline-shift property: positive for a superscript, negative for a subscript. The default is 0; a value that is not finite is 0.
public double BaselineShift { get; init; }Property value
Remarks
The shift applies to the span only: the next span is back on the baseline of the text.
Color
SceneTextSpan.csGets the color of the span, or null for the color of the text.
public SceneColor? Color { get; init; }Property value
DecorationFill
SceneTextSpan.csGets how the lines of the span are painted, or null for the paint of the lines of the text (SceneText.DecorationFill), and else the paint of the glyphs of the span.
public ScenePaint? DecorationFill { get; init; }Property value
Decorations
SceneTextSpan.csGets the lines drawn with the span, or null for the lines of the text.
public SceneTextDecorations? Decorations { get; init; }Property value
Gets the vertical shift of the span, in pixels, as the dy attribute of an SVG tspan: the baseline of the span and of the spans that follow it moves down by this distance. On a path, the shift is across the path. The default is 0; a value that is not finite is 0.
public double Dy { get; init; }Property value
Fill
SceneTextSpan.csGets how the glyphs of the span are painted, or null for SceneTextSpan.Color when it is set, or else for the fill of the text (SceneText.Fill, then SceneText.Color).
public ScenePaint? Fill { get; init; }Property value
Font
SceneTextSpan.csGets the font of the span, or null for the font of the text.
public SceneFont? Font { get; init; }Property value
GlyphRotation
SceneTextSpan.csGets the rotation of each character of the span around its origin on the baseline, in degrees, clockwise, as a single value of the rotate attribute of an SVG tspan. The characters keep their advances. The default is 0; a value that is not finite is 0.
public double GlyphRotation { get; init; }Property value
Remarks
The characters of a rotated span are shaped one grapheme cluster at a time: no kerning applies between them.
LetterSpacing
SceneTextSpan.csGets the space added after each character of the span, or null for the spacing of the text (SceneText.LetterSpacing).
public double? LetterSpacing { get; init; }Property value
Stroke
SceneTextSpan.csGets how the outline of the glyphs of the span is painted, or null for the outline of the text (SceneText.Stroke).
public ScenePaint? Stroke { get; init; }Text
SceneTextSpan.csWordSpacing
SceneTextSpan.csGets the space added to each space of the span, or null for the spacing of the text (SceneText.WordSpacing).
public double? WordSpacing { get; init; }Property value
Gets the x coordinate the span starts at, as the x attribute of an SVG tspan, or null (the default) to start where the previous span ends.
public double? X { get; init; }Property value
Remarks
A span with SceneTextSpan.X or SceneTextSpan.Y starts a new text chunk: the anchor of the text (SceneText.Anchor) applies to each chunk, from its first character. The spans that follow continue from the end of the span. On a path (SceneText.Path), SceneTextSpan.X and SceneTextSpan.Y are ignored. A value that is not finite is ignored.
Gets the y coordinate of the baseline of the span and of the spans that follow it, as the y attribute of an SVG tspan, or null (the default) for the baseline of the previous span.
public double? Y { get; init; }