Method GetSvgGlyphImage
- Namespace
- PaintDotNet.Direct2D1
- Assembly
- PaintDotNet.Windows.dll
GetSvgGlyphImage(Point2Float, IFontFace, float, ushort, bool, in Matrix3x2Float?, IDeviceBrush?, ISvgGlyphStyle?, int, out Matrix3x2Float)
Retrieves an image of the SVG 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.
ICommandList GetSvgGlyphImage(Point2Float glyphOrigin, IFontFace fontFace, float fontEmSize, ushort glyphIndex, bool isSideways, in Matrix3x2Float? worldTransform, IDeviceBrush? defaultFillBrush, ISvgGlyphStyle? svgGlyphStyle, int colorPaletteIndex, out Matrix3x2Float glyphTransform)
Parameters
glyphOrigin
Point2FloatOrigin of 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 output glyphTransform, causing it to properly scale the glyph.
glyphIndex
ushortIndex of the glyph to retrieve.
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. If null, the identity matrix will be used.
defaultFillBrush
IDeviceBrushDescribes how the area is painted.
svgGlyphStyle
ISvgGlyphStyleThe values for context-fill, context-stroke, and context-value that are used when rendering SVG glyphs.
colorPaletteIndex
intThe index used to select a color palette within a color font. Note that this is not the same as the paletteIndex in the ColorGlyphRun struct, which is not relevant for SVG glyphs.
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
- ICommandList
The retrieved glyph image.