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
glyphOriginPoint2FloatOrigin of the glyph.
fontFaceIFontFaceReference 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.
fontEmSizefloatThe specified font size affects the output glyphTransform, causing it to properly scale the glyph.
glyphIndexushortIndex of the glyph to retrieve.
isSidewaysboolIf 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.
worldTransformMatrix3x2Float?The transform to apply to the image. If null, the identity matrix will be used.
defaultFillBrushIDeviceBrushDescribes how the area is painted.
svgGlyphStyleISvgGlyphStyleThe values for context-fill, context-stroke, and context-value that are used when rendering SVG glyphs.
colorPaletteIndexintThe 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.
glyphTransformMatrix3x2FloatOutput 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.