Class Text3DMesh
The text 3D component.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Components.Fonts
Assembly: Evergine.Components.dll
Syntax
public class Text3DMesh : MeshComponent, IDependencyObject
Constructors
Text3DMesh()
Initializes a new instance of the Text3DMesh class.
Declaration
public Text3DMesh()
Properties
Color
Gets or sets the color value.
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
Color |
Ellipsis
Gets or sets a value indicating whether the text adds an ellipsis to the end when the text doesn't have enough space.
Declaration
public bool Ellipsis { get; set; }
Property Value
Type | Description |
---|---|
bool |
Font
Gets or sets the text font.
Declaration
public Font Font { get; set; }
Property Value
Type | Description |
---|---|
Font |
HorizontalAlignment
Gets or sets the horizontal text alignment. Values: Left, Center, or Right. Default: Left.
Declaration
public HorizontalAlignment HorizontalAlignment { get; set; }
Property Value
Type | Description |
---|---|
HorizontalAlignment |
Layer
Gets or sets the layer.
Declaration
public RenderLayerDescription Layer { get; set; }
Property Value
Type | Description |
---|---|
RenderLayerDescription |
LineSpacing
Gets or sets the spacing between text lines.
Declaration
public float LineSpacing { get; set; }
Property Value
Type | Description |
---|---|
float |
Model
Gets the model data.
Declaration
public Model Model { get; }
Property Value
Type | Description |
---|---|
Model |
ModelMeshName
Gets the name of the mesh to render.
Declaration
public string ModelMeshName { get; }
Property Value
Type | Description |
---|---|
string |
Origin
Gets or sets the text origin (default: top-left corner).
Declaration
public Vector2 Origin { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
ScaleFactor
Gets or sets the font scale factor (default value is 1.0).
Declaration
public float ScaleFactor { get; set; }
Property Value
Type | Description |
---|---|
float |
Size
Gets or sets the maximum size dimension. (This feature is commonly used together with Wrapping and Ellipsis).
Declaration
public Vector2 Size { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Softness
Gets or sets the smoothness of the font (anti-aliasing).
Declaration
[RenderPropertyAsFInput(AsSlider = true, DefaultValue = 0.7, MinLimit = 0, MaxLimit = 2)]
public float Softness { get; set; }
Property Value
Type | Description |
---|---|
float |
Text
Gets or sets the text value.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
string |
TextSize
Gets the text space size.
Declaration
public Vector2 TextSize { get; }
Property Value
Type | Description |
---|---|
Vector2 |
VerticalAlignment
Gets or sets the vertical text alignment. Values: Top, Center, or Bottom. Default: Top.
Declaration
public VerticalAlignment VerticalAlignment { get; set; }
Property Value
Type | Description |
---|---|
VerticalAlignment |
Wrapping
Gets or sets a value indicating whether the text can wrap.
Declaration
public bool Wrapping { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
OnAttached()
Invoked when the object is attached to the system.
Declaration
protected override bool OnAttached()
Returns
Type | Description |
---|---|
bool | True if everything is OK. |
Overrides
OnDestroy()
Invoked when the object is about to be disposed.
Declaration
protected override void OnDestroy()
Overrides
OnDetach()
Invoked when the object is detached.
Declaration
protected override void OnDetach()