Method DrawTextLayout
- Namespace
- PaintDotNet.Direct2D1
- Assembly
- PaintDotNet.Windows.dll
DrawTextLayout(Point2Float, ITextLayout, IDeviceBrush, DrawTextOptions)
Draws a text layout object. If the layout is not subsequently changed, this can be more efficient than DrawText when drawing the same layout repeatedly.
void DrawTextLayout(Point2Float origin, ITextLayout textLayout, IDeviceBrush defaultFillBrush, DrawTextOptions options = DrawTextOptions.EnableColorFont)
Parameters
origin
Point2FloatThe point, described in device-independent pixels, at which the upper-left corner of the text described by textLayout is drawn.
textLayout
ITextLayoutThe formatted text to draw. Any drawing effects that do not inherit from ID2D1Resource are ignored. If there are drawing effects that inherit from ID2D1Resource that are not brushes, this method fails and the device context is put in an error state.
defaultFillBrush
IDeviceBrushThe brush used to paint the text.
options
DrawTextOptionsA value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle.
DrawTextLayout(Point2Float, ITextLayout, IDeviceBrush?, ISvgGlyphStyle?, int, DrawTextOptions)
Draws a text layout object. If the layout is not subsequently changed, this can be more efficient than DrawText when drawing the same layout repeatedly.
void DrawTextLayout(Point2Float origin, ITextLayout textLayout, IDeviceBrush? defaultFillBrush, ISvgGlyphStyle? svgGlyphStyle, int colorPaletteIndex = 0, DrawTextOptions options = DrawTextOptions.EnableColorFont)
Parameters
origin
Point2FloatThe point, described in device-independent pixels, at which the upper-left corner of the text described by textLayout is drawn.
textLayout
ITextLayoutThe formatted text to draw. Any drawing effects that do not inherit from ID2D1Resource are ignored. If there are drawing effects that inherit from ID2D1Resource that are not brushes, this method fails and the device context is put in an error state.
defaultFillBrush
IDeviceBrushThe brush used to paint the text.
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.
options
DrawTextOptionsA value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle.