Method GetColorBitmapGlyphImage
- Namespace
- PaintDotNet.Direct2D1
- Assembly
- PaintDotNet.Windows.dll
GetColorBitmapGlyphImage(GlyphImageFormats, Point2Float, IFontFace, float, ushort, bool, in Matrix3x2Float?, Vector2Float, out Matrix3x2Float)
Retrieves an image of the color bitmap glyph from the color glyph cache. If the cache does not already contain the requested resource, it will be created. This method may be used to extend the lifetime of a glyph image even after it is evicted from the color glyph cache.
IDeviceImage GetColorBitmapGlyphImage(GlyphImageFormats glyphImageFormat, Point2Float glyphOrigin, IFontFace fontFace, float fontEmSize, ushort glyphIndex, bool isSideways, in Matrix3x2Float? worldTransform, Vector2Float dpi, out Matrix3x2Float glyphTransform)
Parameters
glyphImageFormat
GlyphImageFormatsThe format for the glyph image. If there is no image data in the requested format for the requested glyph, this method will throw an exception.
glyphOrigin
Point2FloatThe origin for the glyph.
fontFace
IFontFaceReference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines.
fontEmSize
floatThe specified font size affects the choice of which bitmap to use from the font. It also affects the output GlyphTransform, causing it to properly scale the glyph.
glyphIndex
ushortIndex of the glyph.
isSideways
boolIf true, specifies that glyphs are rotated 90 degrees to the left and vertical metrics are used. Vertical writing is achieved by specifying isSideways as true and rotating the entire run 90 degrees to the right via a rotate transform.
worldTransform
Matrix3x2Float?The transform to apply to the image. This input transform affects the choice of which bitmap to use from the font. It is also factored into the output glyphTransform. If null, the identity matrix will be used.
dpi
Vector2FloatDots per inch.
glyphTransform
Matrix3x2FloatOutput transform, which transforms from the glyph's space to the same output space as the worldTransform. This includes the input glyphOrigin, the glyph's offset from the glyphOrigin, and any other required transformations.
Returns
- IDeviceImage
The retrieved glyph image.