Table of Contents

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 GlyphImageFormats

The 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 Point2Float

The origin for the glyph.

fontFace IFontFace

Reference 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 float

The 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 ushort

Index of the glyph.

isSideways bool

If 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 Vector2Float

Dots per inch.

glyphTransform Matrix3x2Float

Output 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.