Class GLText
- Namespace
- SearchAThing.OpenGL.Core
- Assembly
- netcore-opengl-core.dll
Gl text object.
[JsonObject(MemberSerialization.OptIn)]
public class GLText : INotifyPropertyChanged
- Inheritance
-
GLText
- Implements
- Inherited Members
Constructors
GLText(in Matrix4x4, string, float?, Color?, GLTextVHAlignment?)
Create a gl text.
public GLText(in Matrix4x4 cs, string text, float? height = null, Color? color = null, GLTextVHAlignment? alignment = null)
Parameters
csMatrix4x4Coordinate system which origin represents the text insertion point and XY plane where text resides. Use MakeScreenCS(in Vector3?) for screenMode text.
textstringText string.
Supports multiline with '\n' newline character.heightfloat?Text height.
colorColor?Text color.
alignmentGLTextVHAlignment?Text alignment.
Properties
Alignment
Text alignment.
[JsonProperty]
public GLTextVHAlignment Alignment { get; set; }
Property Value
- See Also
BuiltinFontPathfilename
Builtin font pathfilename.
public static string BuiltinFontPathfilename { get; }
Property Value
- See Also
CS
Coordinate system which origin represents the text insertion point and XY plane where text resides.
public Matrix4x4 CS { get; set; }
Property Value
Color
Text color.
[JsonProperty]
public Color Color { get; set; }
Property Value
Font
Skia font object with this font typeface.
public SKFont Font { get; set; }
Property Value
Height
Text height.
[JsonProperty]
public float Height { get; set; }
Property Value
SpacingBetweenLines
Space between lines (em).
[JsonProperty]
public float SpacingBetweenLines { get; set; }
Property Value
Text
Text string.
Supports multiline with '\n' newline character.
[JsonProperty]
public string Text { get; set; }
Property Value
Methods
OnPropertyChanged(string?)
invoke this method to forward propertchanged event notification. note: not needed to specify propertyName set by compiler service to called property.
protected void OnPropertyChanged(string? propertyName = null)
Parameters
propertyNamestring
Events
PropertyChanged
public event PropertyChangedEventHandler? PropertyChanged