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
| Name | Description |
|---|---|
| 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
Offsetint- The position of the encoded image in the bytes of the font; for
BitmapGlyphFormat.MaskandBitmapGlyphFormat.Bgra, the position of the data of the glyph. Lengthint- The length of the encoded image, or of the data of the glyph.
PixelsPerEmXint- The number of pixels of the image per em, horizontally: the size the image is made for.
PixelsPerEmYint- The number of pixels of the image per em, vertically.
Leftint- The distance from the origin of the glyph to the left of the image, in pixels of the image.
Bottomint?- The distance from the baseline up to the bottom of the image, in pixels of the image;
nullwhen the font gives the top instead. Topint- The distance from the baseline up to the top of the image, in pixels of the image.
FormatBitmapGlyphFormat- The format the font says the encoded image has.
Properties
| Name | Description |
|---|---|
| BitDepth | Gets the number of bits per pixel of the strike: 1, 2, 4 or 8 for a mask, 32 for colors. |
| Bottom | 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. |
| Format | The format the font says the encoded image has. |
| Height | Gets the height of the image, in pixels, as the font declares it; 0 when only the encoded image gives it. |
| Left | The distance from the origin of the glyph to the left of the image, in pixels of the image. |
| Length | The length of the encoded image, or of the data of the glyph. |
| Offset | 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. |
| PixelsPerEmX | The number of pixels of the image per em, horizontally: the size the image is made for. |
| PixelsPerEmY | The number of pixels of the image per em, vertically. |
| Top | The distance from the baseline up to the top of the image, in pixels of the image. |
| Width | Gets the width of the image, in pixels, as the font declares it; 0 when only the encoded image gives it. |
BitDepth
BitmapGlyph.csBottom
BitmapGlyph.csFormat
BitmapGlyph.csThe format the font says the encoded image has.
public BitmapGlyphFormat Format { get; init; }Property value
Height
BitmapGlyph.csLeft
BitmapGlyph.csLength
BitmapGlyph.csOffset
BitmapGlyph.csThe 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
PixelsPerEmX
BitmapGlyph.csPixelsPerEmY
BitmapGlyph.csWidth
BitmapGlyph.csMethods
| Name | Description |
|---|---|
| Deconstruct(int, int, int, int, int, int?, int, BitmapGlyphFormat) | |
| Equals(BitmapGlyph) | |
| Equals(object) | |
| GetHashCode() | |
| ToString() |
Deconstruct(int, int, int, int, int, int?, int, BitmapGlyphFormat)
Equals overloads
Equals(BitmapGlyph)
public bool Equals(BitmapGlyph other)No documentation is available.
Equals(object)
GetHashCode()
ToString()
Operators
| Name | Description |
|---|---|
| operator ==(BitmapGlyph, BitmapGlyph) | |
| operator !=(BitmapGlyph, BitmapGlyph) |
operator ==(BitmapGlyph, BitmapGlyph)
public static bool operator ==(BitmapGlyph left, BitmapGlyph right)No documentation is available.
operator !=(BitmapGlyph, BitmapGlyph)
public static bool operator !=(BitmapGlyph left, BitmapGlyph right)No documentation is available.