Index · Object → RefCounted → CharFXTransform

CharFXTransform

Controls how an individual character will be displayed in a RichTextEffect.

Class Description

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

Properties

var color: Color = Color(0, 0, 0, 1)

The color the character will be drawn with.

var elapsed_time: float = 0.0

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

Note: Time still passes while the RichTextLabel is hidden.

var env: Dictionary = {}

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)}
var font: RID = RID()

TextServer RID of the font used to render glyph, this value can be used with TextServer.font_* methods to retrieve font information.

Note: Read-only. Setting this property won't affect drawing.

var glyph_count: int = 0

Number of glyphs in the grapheme cluster. This value is set in the first glyph of a cluster.

Note: Read-only. Setting this property won't affect drawing.

var glyph_flags: int = 0

Glyph flags. See TextServer.GraphemeFlag for more info.

Note: Read-only. Setting this property won't affect drawing.

var glyph_index: int = 0

Glyph index specific to the font. If you want to replace this glyph, use TextServer.font_get_glyph_index() with font to get a new glyph index for a single character.

var offset: Vector2 = Vector2(0, 0)

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

var outline: bool = false

If true, FX transform is called for outline drawing.

Note: Read-only. Setting this property won't affect drawing.

var range: Vector2i = Vector2i(0, 0)

Absolute character range in the string, corresponding to the glyph.

Note: Read-only. Setting this property won't affect drawing.

var relative_index: int = 0

The character offset of the glyph, relative to the current RichTextEffect custom block.

Note: Read-only. Setting this property won't affect drawing.

var transform: Transform2D = Transform2D(1, 0, 0, 1, 0, 0)

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.

var visible: bool = true

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.

Methods

Inherited from RefCounted (4)
func init_ref() -> bool
func reference() -> bool
func unreference() -> bool
Inherited from Object (62)
func _get(property: StringName) -> Variant
func _get_property_list() -> Dictionary[]
func _init() -> void
func _iter_get(iter: Variant) -> Variant
func _iter_init(iter: Array) -> bool
func _iter_next(iter: Array) -> bool
func _notification(what: int) -> void
func _set(property: StringName, value: Variant) -> bool
func _to_string() -> String
func _validate_property(property: Dictionary) -> void
func add_user_signal(signal: String, arguments: Array = []) -> void
func call(method: StringName) -> Variant
func callv(method: StringName, arg_array: Array) -> Variant
func cancel_free() -> void
func connect(signal: StringName, callable: Callable, flags: int = 0) -> Error
func disconnect(signal: StringName, callable: Callable) -> void
func emit_signal(signal: StringName) -> Error
func free() -> void
func get(property: StringName) -> Variant
func get_class() -> String
func get_incoming_connections() -> Dictionary[]
func get_indexed(property_path: NodePath) -> Variant
func get_meta(name: StringName, default: Variant = null) -> Variant
func get_meta_list() -> StringName[]
func get_method_list() -> Dictionary[]
func get_property_list() -> Dictionary[]
func get_signal_connection_list(signal: StringName) -> Dictionary[]
func get_signal_list() -> Dictionary[]
func has_meta(name: StringName) -> bool
func has_method(method: StringName) -> bool
func has_signal(signal: StringName) -> bool
func is_class(class: StringName) -> bool
func is_connected(signal: StringName, callable: Callable) -> bool
func notification(what: int, reversed: bool = false) -> void
func remove_meta(name: StringName) -> void
func remove_user_signal(signal: StringName) -> void
func set(property: StringName, value: Variant) -> void
func set_block_signals(enable: bool) -> void
func set_deferred(property: StringName, value: Variant) -> void
func set_indexed(property_path: NodePath, value: Variant) -> void
func set_message_translation(enable: bool) -> void
func set_meta(name: StringName, value: Variant) -> void
func set_script(script: Variant) -> void
func set_translation_domain(domain: StringName) -> void
func to_string() -> String
func tr(message: StringName, context: StringName = &"") -> String
func tr_n(message: StringName, plural_message: StringName, n: int, context: StringName = &"") -> String

Signals

Inherited from Object (2)