CharFXTransform
Per-glyph context for a custom text effect.
CharFXTransform is passed to RichTextEffect._ProcessCustomFX and reused. A glyph need not correspond to one C# character: ligatures, composite characters and drawing passes break that assumption. Do not retain it as a snapshot or dispose it in the callback.
Drawing reads back Transform, Offset, Color, GlyphIndex and Visible. Other fields describe input context; their setters do not make the effect reshape text. To retain values, copy the required scalar/struct fields rather than the context reference.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
CharFXTransformConstructor
public CharFXTransform();Creates a separate context container. For effects, use the callback argument: constructing one does not attach it to RichTextLabel.
Properties13
ColorProperty
public Color Color { get; set; }Current glyph color after earlier settings/effects. Preserve the required alpha in a replacement Color. Changes this drawing pass rather than every following character.
ElapsedTimeProperty
public double ElapsedTime { get; set; }Effect-span elapsed time in seconds for animation. Neither frame delta nor system time. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
EnvProperty
public Reckfell.Collections.Dictionary Env { get; set; }Effect-span parameter dictionary, supplied by BBCode or PushCustomfx env. Shared by reference; do not mutate it as a temporary snapshot. CharFXTransform destruction clears the dictionary: supply a separate Dictionary for independent data. Replacing Env does not edit source BBCode.
FontProperty
public Rid Font { get; set; }Borrowed RID of the current font for glyph queries. Do not free it through a server. Changing the field does not switch the drawing font; use RichTextLabel formatting for another font.
GlyphCountProperty
public byte GlyphCount { get; set; }Text-system glyph count for the associated cluster, not source-string length. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
GlyphFlagsProperty
public ushort GlyphFlags { get; set; }Text-system glyph flags such as direction and cluster boundaries. Not effect flags. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
GlyphIndexProperty
public uint GlyphIndex { get; set; }Glyph index in the current font, not a Unicode value or C# char index. May be replaced with another valid glyph in that font; layout and advance are not recomputed.
OffsetProperty
public Vector2 Offset { get; set; }Additional glyph drawing offset in pixels. Add to the incoming Offset to retain preceding effects. Does not move a character in logical text.
OutlineProperty
public bool Outline { get; set; }true for outline or shadow passes, false for the main text. One glyph may invoke the callback several times per frame. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
RangeProperty
public Vector2I Range { get; set; }Logical character range represented by the glyph: X start, Y end. Not C# UTF-16 string indices or screen coordinates. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
RelativeIndexProperty
public int RelativeIndex { get; set; }Glyph-start offset from the effect span start in logical characters. Not a callback invocation counter: drawing passes can repeat. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
TransformProperty
public Transform2D Transform { get; set; }Current glyph transform, already containing its base position. Modify relative to the incoming value; replacing it with Identity can lose positioning. Does not change wrapping or line sizes.
VisibleProperty
public bool Visible { get; set; }Allows drawing this glyph. false hides it while retaining its occupied space. true cannot restore a glyph already hidden by an earlier effect or visibility limit.
Methods26
GetColorColor
public Color GetColor();Current glyph color after earlier settings/effects. Preserve the required alpha in a replacement Color. Changes this drawing pass rather than every following character.
ColorCurrent glyph color after earlier settings/effects. Preserve the required alpha in a replacement Color. Changes this drawing pass rather than every following character.
GetElapsedTimedouble
public double GetElapsedTime();Effect-span elapsed time in seconds for animation. Neither frame delta nor system time. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
doubleEffect-span elapsed time in seconds for animation. Neither frame delta nor system time. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
GetEnvironmentReckfell.Collections.Dictionary
public Reckfell.Collections.Dictionary GetEnvironment();Effect-span parameter dictionary, supplied by BBCode or PushCustomfx env. Shared by reference; do not mutate it as a temporary snapshot. CharFXTransform destruction clears the dictionary: supply a separate Dictionary for independent data. Replacing Env does not edit source BBCode.
Reckfell.Collections.DictionaryEffect-span parameter dictionary, supplied by BBCode or PushCustomfx env. Shared by reference; do not mutate it as a temporary snapshot. CharFXTransform destruction clears the dictionary: supply a separate Dictionary for independent data. Replacing Env does not edit source BBCode.
GetFontRid
public Rid GetFont();Borrowed RID of the current font for glyph queries. Do not free it through a server. Changing the field does not switch the drawing font; use RichTextLabel formatting for another font.
RidBorrowed RID of the current font for glyph queries. Do not free it through a server. Changing the field does not switch the drawing font; use RichTextLabel formatting for another font.
GetGlyphCountbyte
public byte GetGlyphCount();Text-system glyph count for the associated cluster, not source-string length. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
byteText-system glyph count for the associated cluster, not source-string length. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
GetGlyphFlagsushort
public ushort GetGlyphFlags();Text-system glyph flags such as direction and cluster boundaries. Not effect flags. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
ushortText-system glyph flags such as direction and cluster boundaries. Not effect flags. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
GetGlyphIndexuint
public uint GetGlyphIndex();Glyph index in the current font, not a Unicode value or C# char index. May be replaced with another valid glyph in that font; layout and advance are not recomputed.
uintGlyph index in the current font, not a Unicode value or C# char index. May be replaced with another valid glyph in that font; layout and advance are not recomputed.
GetOffsetVector2
public Vector2 GetOffset();Additional glyph drawing offset in pixels. Add to the incoming Offset to retain preceding effects. Does not move a character in logical text.
Vector2Additional glyph drawing offset in pixels. Add to the incoming Offset to retain preceding effects. Does not move a character in logical text.
GetRangeVector2I
public Vector2I GetRange();Logical character range represented by the glyph: X start, Y end. Not C# UTF-16 string indices or screen coordinates. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
Vector2ILogical character range represented by the glyph: X start, Y end. Not C# UTF-16 string indices or screen coordinates. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
GetRelativeIndexint
public int GetRelativeIndex();Glyph-start offset from the effect span start in logical characters. Not a callback invocation counter: drawing passes can repeat. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
intGlyph-start offset from the effect span start in logical characters. Not a callback invocation counter: drawing passes can repeat. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
GetTransformTransform2D
public Transform2D GetTransform();Current glyph transform, already containing its base position. Modify relative to the incoming value; replacing it with Identity can lose positioning. Does not change wrapping or line sizes.
Transform2DCurrent glyph transform, already containing its base position. Modify relative to the incoming value; replacing it with Identity can lose positioning. Does not change wrapping or line sizes.
IsOutlinebool
public bool IsOutline();true for outline or shadow passes, false for the main text. One glyph may invoke the callback several times per frame. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
booltrue for outline or shadow passes, false for the main text. One glyph may invoke the callback several times per frame. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
IsVisiblebool
public bool IsVisible();Allows drawing this glyph. false hides it while retaining its occupied space. true cannot restore a glyph already hidden by an earlier effect or visibility limit.
boolAllows drawing this glyph. false hides it while retaining its occupied space. true cannot restore a glyph already hidden by an earlier effect or visibility limit.
SetColorvoid
public void SetColor(Color color);Current glyph color after earlier settings/effects. Preserve the required alpha in a replacement Color. Changes this drawing pass rather than every following character.
| Name | Type | Default |
|---|---|---|
color | Color | — |
colorNew value for the corresponding context field; see that field’s application limits.
SetElapsedTimevoid
public void SetElapsedTime(double time);Effect-span elapsed time in seconds for animation. Neither frame delta nor system time. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
| Name | Type | Default |
|---|---|---|
time | double | — |
timeNew value for the corresponding context field; see that field’s application limits.
SetEnvironmentvoid
public void SetEnvironment(Reckfell.Collections.Dictionary environment);Effect-span parameter dictionary, supplied by BBCode or PushCustomfx env. Shared by reference; do not mutate it as a temporary snapshot. CharFXTransform destruction clears the dictionary: supply a separate Dictionary for independent data. Replacing Env does not edit source BBCode.
| Name | Type | Default |
|---|---|---|
environment | Reckfell.Collections.Dictionary | — |
environmentNew value for the corresponding context field; see that field’s application limits.
SetFontvoid
public void SetFont(Rid font);Borrowed RID of the current font for glyph queries. Do not free it through a server. Changing the field does not switch the drawing font; use RichTextLabel formatting for another font.
| Name | Type | Default |
|---|---|---|
font | Rid | — |
fontNew value for the corresponding context field; see that field’s application limits.
SetGlyphCountvoid
public void SetGlyphCount(byte glyphCount);Text-system glyph count for the associated cluster, not source-string length. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
| Name | Type | Default |
|---|---|---|
glyphCount | byte | — |
glyphCountNew value for the corresponding context field; see that field’s application limits.
SetGlyphFlagsvoid
public void SetGlyphFlags(ushort glyphFlags);Text-system glyph flags such as direction and cluster boundaries. Not effect flags. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
| Name | Type | Default |
|---|---|---|
glyphFlags | ushort | — |
glyphFlagsNew value for the corresponding context field; see that field’s application limits.
SetGlyphIndexvoid
public void SetGlyphIndex(uint glyphIndex);Glyph index in the current font, not a Unicode value or C# char index. May be replaced with another valid glyph in that font; layout and advance are not recomputed.
| Name | Type | Default |
|---|---|---|
glyphIndex | uint | — |
glyphIndexNew value for the corresponding context field; see that field’s application limits.
SetOffsetvoid
public void SetOffset(Vector2 offset);Additional glyph drawing offset in pixels. Add to the incoming Offset to retain preceding effects. Does not move a character in logical text.
| Name | Type | Default |
|---|---|---|
offset | Vector2 | — |
offsetNew value for the corresponding context field; see that field’s application limits.
SetOutlinevoid
public void SetOutline(bool outline);true for outline or shadow passes, false for the main text. One glyph may invoke the callback several times per frame. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
| Name | Type | Default |
|---|---|---|
outline | bool | — |
outlineNew value for the corresponding context field; see that field’s application limits.
SetRangevoid
public void SetRange(Vector2I range);Logical character range represented by the glyph: X start, Y end. Not C# UTF-16 string indices or screen coordinates. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
| Name | Type | Default |
|---|---|---|
range | Vector2I | — |
rangeNew value for the corresponding context field; see that field’s application limits.
SetRelativeIndexvoid
public void SetRelativeIndex(int relativeIndex);Glyph-start offset from the effect span start in logical characters. Not a callback invocation counter: drawing passes can repeat. Input context for the current glyph; writing the setter does not change text layout and is overwritten by the next engine callback.
| Name | Type | Default |
|---|---|---|
relativeIndex | int | — |
relativeIndexNew value for the corresponding context field; see that field’s application limits.
SetTransformvoid
public void SetTransform(Transform2D transform);Current glyph transform, already containing its base position. Modify relative to the incoming value; replacing it with Identity can lose positioning. Does not change wrapping or line sizes.
| Name | Type | Default |
|---|---|---|
transform | Transform2D | — |
transformNew value for the corresponding context field; see that field’s application limits.
SetVisibilityvoid
public void SetVisibility(bool visibility);Allows drawing this glyph. false hides it while retaining its occupied space. true cannot restore a glyph already hidden by an earlier effect or visibility limit.
| Name | Type | Default |
|---|---|---|
visibility | bool | — |
visibilityNew value for the corresponding context field; see that field’s application limits.