Table of Contents

Class CharFXTransform

Namespace
Godot
Assembly
GodotSharp.dll

By setting various properties on this object, you can control how individual characters will be displayed in a RichTextEffect.

public class CharFXTransform : RefCounted, IDisposable
Inheritance
CharFXTransform
Implements
Inherited Members

Constructors

CharFXTransform()

public CharFXTransform()

Properties

Color

The color the character will be drawn with.

public Color Color { get; set; }

Property Value

Color

ElapsedTime

The time elapsed since the RichTextLabel was added to the scene tree (in seconds). Time stops when the RichTextLabel is paused (see ProcessMode). Resets when the text in the RichTextLabel is changed.

Note: Time still passes while the RichTextLabel is hidden.

public double ElapsedTime { get; set; }

Property Value

double

Env

Contains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as bool, int or float, they will be converted automatically. Color codes in the form #rrggbb or #rgb will be converted to an opaque Color. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string.

For example, the opening BBCode tag [example foo=hello bar=true baz=42 color=#ffffff] will map to the following Dictionary:

{"foo": "hello", "bar": true, "baz": 42, "color": Color(1, 1, 1, 1)}
public Dictionary Env { get; set; }

Property Value

Dictionary

Font

Font resource used to render glyph.

public Rid Font { get; set; }

Property Value

Rid

GlyphCount

Number of glyphs in the grapheme cluster. This value is set in the first glyph of a cluster. Setting this property won't affect drawing.

public byte GlyphCount { get; set; }

Property Value

byte

GlyphFlags

Glyph flags. See TextServer.GraphemeFlag for more info. Setting this property won't affect drawing.

public ushort GlyphFlags { get; set; }

Property Value

ushort

GlyphIndex

Font specific glyph index.

public uint GlyphIndex { get; set; }

Property Value

uint

Offset

The position offset the character will be drawn with (in pixels).

public Vector2 Offset { get; set; }

Property Value

Vector2

Outline

If true, FX transform is called for outline drawing. Setting this property won't affect drawing.

public bool Outline { get; set; }

Property Value

bool

Range

Absolute character range in the string, corresponding to the glyph. Setting this property won't affect drawing.

public Vector2I Range { get; set; }

Property Value

Vector2I

RelativeIndex

The character offset of the glyph, relative to the current RichTextEffect custom block. Setting this property won't affect drawing.

public int RelativeIndex { get; set; }

Property Value

int

Transform

The current transform of the current glyph. It can be overridden (for example, by driving the position and rotation from a curve). You can also alter the existing value to apply transforms on top of other effects.

public Transform2D Transform { get; set; }

Property Value

Transform2D

Visible

If true, the character will be drawn. If false, the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their Color to Color(1, 1, 1, 0) instead.

public bool Visible { get; set; }

Property Value

bool

Methods

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool