Struct FontRenderingOptions
Represents the options for rendering text with a custom font.
public readonly record struct FontRenderingOptions : IEquatable<FontRenderingOptions>
- Implements
- Inherited Members
- Extension Methods
Constructors
FontRenderingOptions(Vector2, Vector2?, float, Vector2, float, float, Color, float, ICustomFontEffect?)
Represents the options for rendering text with a custom font.
public FontRenderingOptions(Vector2 Position, Vector2? Scale, float Rotation, Vector2 Origin, float CharacterSpacing, float LineSpacing, Color Color, float Depth, ICustomFontEffect? Effect)
Parameters
PositionVector2The position of the text in the rendering space.
ScaleVector2?The scale factor for the text. If null, the default scale will be used.
RotationfloatThe rotation angle of the text in degrees.
OriginVector2The origin point for the text rotation.
CharacterSpacingfloatThe spacing between characters in the text.
LineSpacingfloatThe spacing between lines of text.
ColorColorThe color of the text.
DepthfloatThe depth value for rendering, used for layering in 3D space.
EffectICustomFontEffectAn optional custom font effect to apply to the text.
Properties
CharacterSpacing
The spacing between characters in the text.
public float CharacterSpacing { get; init; }
Property Value
Color
The color of the text.
public Color Color { get; init; }
Property Value
Depth
The depth value for rendering, used for layering in 3D space.
public float Depth { get; init; }
Property Value
Effect
An optional custom font effect to apply to the text.
public ICustomFontEffect? Effect { get; init; }
Property Value
LineSpacing
The spacing between lines of text.
public float LineSpacing { get; init; }
Property Value
Origin
The origin point for the text rotation.
public Vector2 Origin { get; init; }
Property Value
Position
The position of the text in the rendering space.
public Vector2 Position { get; init; }
Property Value
Rotation
The rotation angle of the text in degrees.
public float Rotation { get; init; }
Property Value
Scale
The scale factor for the text. If null, the default scale will be used.
public Vector2? Scale { get; init; }