Table of Contents

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

cs Matrix4x4

Coordinate system which origin represents the text insertion point and XY plane where text resides. Use MakeScreenCS(in Vector3?) for screenMode text.

text string

Text string.
Supports multiline with '\n' newline character.

height float?

Text height.

color Color?

Text color.

alignment GLTextVHAlignment?

Text alignment.

Properties

Alignment

Text alignment.

[JsonProperty]
public GLTextVHAlignment Alignment { get; set; }

Property Value

GLTextVHAlignment
See Also

BuiltinFontPathfilename

Builtin font pathfilename.

public static string BuiltinFontPathfilename { get; }

Property Value

string
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

Matrix4x4

Color

Text color.

[JsonProperty]
public Color Color { get; set; }

Property Value

Color

Font

Skia font object with this font typeface.

public SKFont Font { get; set; }

Property Value

SKFont

Height

Text height.

[JsonProperty]
public float Height { get; set; }

Property Value

float

SpacingBetweenLines

Space between lines (em).

[JsonProperty]
public float SpacingBetweenLines { get; set; }

Property Value

float

Text

Text string.
Supports multiline with '\n' newline character.

[JsonProperty]
public string Text { get; set; }

Property Value

string

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

propertyName string

Events

PropertyChanged

public event PropertyChangedEventHandler? PropertyChanged

Event Type

PropertyChangedEventHandler