Table of Contents

Class GLFontChar

Namespace
SearchAThing.OpenGL.Core
Assembly
netcore-opengl-core.dll

Holds a single font character bitmap and allocated texture.

public class GLFontChar
Inheritance
GLFontChar
Inherited Members

Constructors

GLFontChar(GLContext, char, float, in SKRect, SKBitmap, SKFont)

Construct a character bitmap and texture object.

public GLFontChar(GLContext glContext, char c, float measure, in SKRect textBounds, SKBitmap bitmap, SKFont font)

Parameters

glContext GLContext

Gl context.

c char

Font character code.

measure float

Width of the (virtual) bitmap.
This value is computed through SKPaint.MeasureText(), its used by MakeTextFigure(GLModel, GLText) for empty characters such as white space where TextBounds gives no useful information and bitmap is empty.

textBounds SKRect

Bounds of the character font rendered at FONT_BITMAP_PIXEL pixels.

bitmap SKBitmap

Bitmap that hold the White on transparent background image of the character.

font SKFont

Pointer to the font associated.

Properties

Bitmap

Bitmap that hold the White on transparent background image of the character.

public SKBitmap Bitmap { get; }

Property Value

SKBitmap

Font

Pointer to the font associated.

public SKFont Font { get; }

Property Value

SKFont

Measure

Width of the (virtual) bitmap.

public float Measure { get; }

Property Value

float

TextBounds

Bounds of the character font rendered at FONT_BITMAP_PIXEL pixels.

public SKRect TextBounds { get; }

Property Value

SKRect

Texture

Texture allocated at constructor using given gl context for the character bitmap.

public GLTexture2D? Texture { get; }

Property Value

GLTexture2D

c

Font character code.

public char c { get; }

Property Value

char

Methods

ToString()

public override string ToString()

Returns

string

See Also