CharFXTransform
Controls how an individual character will be displayed in a RichTextEffect
.
class CharFXTransform
By setting various properties on this object, you can control how individual characters will be displayed in a RichTextEffect
.
Superclasses
class RefCounted
Base class for reference-counted objects.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
Instance members
var color: Color
The color the character will be drawn with.
var elapsedTime: Double
The time elapsed since the
RichTextLabel
was added to the scene tree (in seconds). Time stops when theRichTextLabel
is paused (seeprocessMode
). Resets when the text in theRichTextLabel
is changed.var env: GDictionary
Contains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as [bool], integer or float, they will be converted automatically. Color codes in the form
#rrggbb
or#rgb
will be converted to an opaqueColor
. String arguments may not contain spaces, even if they’re quoted. If present, quotes will also be present in the final string.var font: RID
Font resource used to render glyph.
var glyphCount: UInt8
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.
var glyphFlags: UInt16
Glyph flags. See
TextServer.GraphemeFlag
for more info. Setting this property won’t affect drawing.var glyphIndex: UInt32
Font specific glyph index.
var offset: Vector2
The position offset the character will be drawn with (in pixels).
var outline: Bool
If
true
, FX transform is called for outline drawing. Setting this property won’t affect drawing.var range: Vector2i
Absolute character range in the string, corresponding to the glyph. Setting this property won’t affect drawing.
var relativeIndex: Int32
The character offset of the glyph, relative to the current
RichTextEffect
custom block. Setting this property won’t affect drawing.var transform: Transform2D
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
If
true
, the character will be drawn. Iffalse
, the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set theircolor
toColor(1, 1, 1, 0)
instead.