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
glContextGLContextGl context.
ccharFont character code.
measurefloatWidth 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.textBoundsSKRectBounds of the character font rendered at FONT_BITMAP_PIXEL pixels.
bitmapSKBitmapBitmap that hold the White on transparent background image of the character.
fontSKFontPointer to the font associated.
Properties
Bitmap
Bitmap that hold the White on transparent background image of the character.
public SKBitmap Bitmap { get; }
Property Value
Font
Pointer to the font associated.
public SKFont Font { get; }
Property Value
Measure
Width of the (virtual) bitmap.
public float Measure { get; }
Property Value
TextBounds
Bounds of the character font rendered at FONT_BITMAP_PIXEL pixels.
public SKRect TextBounds { get; }
Property Value
Texture
Texture allocated at constructor using given gl context for the character bitmap.
public GLTexture2D? Texture { get; }
Property Value
c
Font character code.
public char c { get; }
Property Value
Methods
ToString()
public override string ToString()