BitmapGlyph Struct

A glyph a font gives as an image of a fixed size: where the image is in the font data, and where it is drawn.

public readonly struct BitmapGlyph : IEquatable<BitmapGlyph>
Implements

Constructors

NameDescription
BitmapGlyph(int, int, int, int, int, int?, int, BitmapGlyphFormat)A glyph a font gives as an image of a fixed size: where the image is in the font data, and where it is drawn.

BitmapGlyph(int, int, int, int, int, int?, int, BitmapGlyphFormat)

A glyph a font gives as an image of a fixed size: where the image is in the font data, and where it is drawn.

public BitmapGlyph(int Offset, int Length, int PixelsPerEmX, int PixelsPerEmY, int Left, int? Bottom, int Top, BitmapGlyphFormat Format)

Parameters

Offset int
The position of the encoded image in the bytes of the font; for BitmapGlyphFormat.Mask and BitmapGlyphFormat.Bgra, the position of the data of the glyph.
Length int
The length of the encoded image, or of the data of the glyph.
PixelsPerEmX int
The number of pixels of the image per em, horizontally: the size the image is made for.
PixelsPerEmY int
The number of pixels of the image per em, vertically.
Left int
The distance from the origin of the glyph to the left of the image, in pixels of the image.
Bottom int?
The distance from the baseline up to the bottom of the image, in pixels of the image; null when the font gives the top instead.
Top int
The distance from the baseline up to the top of the image, in pixels of the image.
Format BitmapGlyphFormat
The format the font says the encoded image has.

Properties

NameDescription
BitDepthGets the number of bits per pixel of the strike: 1, 2, 4 or 8 for a mask, 32 for colors.
BottomThe distance from the baseline up to the bottom of the image, in pixels of the image; null when the font gives the top instead.
FormatThe format the font says the encoded image has.
HeightGets the height of the image, in pixels, as the font declares it; 0 when only the encoded image gives it.
LeftThe distance from the origin of the glyph to the left of the image, in pixels of the image.
LengthThe length of the encoded image, or of the data of the glyph.
OffsetThe position of the encoded image in the bytes of the font; for BitmapGlyphFormat.Mask and BitmapGlyphFormat.Bgra, the position of the data of the glyph.
PixelsPerEmXThe number of pixels of the image per em, horizontally: the size the image is made for.
PixelsPerEmYThe number of pixels of the image per em, vertically.
TopThe distance from the baseline up to the top of the image, in pixels of the image.
WidthGets the width of the image, in pixels, as the font declares it; 0 when only the encoded image gives it.

Gets the number of bits per pixel of the strike: 1, 2, 4 or 8 for a mask, 32 for colors.

public int BitDepth { get; init; }

Property value

int

The distance from the baseline up to the bottom of the image, in pixels of the image; null when the font gives the top instead.

public int? Bottom { get; init; }

Property value

int?

The format the font says the encoded image has.

public BitmapGlyphFormat Format { get; init; }

Property value

BitmapGlyphFormat

Gets the height of the image, in pixels, as the font declares it; 0 when only the encoded image gives it.

public int Height { get; init; }

Property value

int

The distance from the origin of the glyph to the left of the image, in pixels of the image.

public int Left { get; init; }

Property value

int

The length of the encoded image, or of the data of the glyph.

public int Length { get; init; }

Property value

int

The position of the encoded image in the bytes of the font; for BitmapGlyphFormat.Mask and BitmapGlyphFormat.Bgra, the position of the data of the glyph.

public int Offset { get; init; }

Property value

int

PixelsPerEmX

BitmapGlyph.cs

The number of pixels of the image per em, horizontally: the size the image is made for.

public int PixelsPerEmX { get; init; }

Property value

int

PixelsPerEmY

BitmapGlyph.cs

The number of pixels of the image per em, vertically.

public int PixelsPerEmY { get; init; }

Property value

int

The distance from the baseline up to the top of the image, in pixels of the image.

public int Top { get; init; }

Property value

int

Gets the width of the image, in pixels, as the font declares it; 0 when only the encoded image gives it.

public int Width { get; init; }

Property value

int

Methods

NameDescription
Deconstruct(int, int, int, int, int, int?, int, BitmapGlyphFormat)
Equals(BitmapGlyph)
Equals(object)
GetHashCode()
ToString()

Deconstruct(int, int, int, int, int, int?, int, BitmapGlyphFormat)

public void Deconstruct(out int Offset, out int Length, out int PixelsPerEmX, out int PixelsPerEmY, out int Left, out int? Bottom, out int Top, out BitmapGlyphFormat Format)

Parameters

Offset int
Length int
PixelsPerEmX int
PixelsPerEmY int
Left int
Bottom int?
Top int
Format BitmapGlyphFormat

No documentation is available.

Equals overloads

Equals(BitmapGlyph)

public bool Equals(BitmapGlyph other)
Parameters
other BitmapGlyph
Returns

bool

No documentation is available.

Equals(object)

public override bool Equals(object obj)
Parameters
obj object
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(BitmapGlyph, BitmapGlyph)
operator !=(BitmapGlyph, BitmapGlyph)

operator ==(BitmapGlyph, BitmapGlyph)

public static bool operator ==(BitmapGlyph left, BitmapGlyph right)

Parameters

left BitmapGlyph
right BitmapGlyph

Returns

bool

No documentation is available.

operator !=(BitmapGlyph, BitmapGlyph)

public static bool operator !=(BitmapGlyph left, BitmapGlyph right)

Parameters

left BitmapGlyph
right BitmapGlyph

Returns

bool

No documentation is available.