[]
Draws the specified text using the format information provided by an C1.Win.DX.DirectWrite.TextFormat object.
public void DrawText(string text, TextFormat textFormat, RectF layoutRect, Brush defaultForegroundBrush)
Type | Name | Description |
---|---|---|
string | text | A reference to an array of Unicode characters to draw. |
TextFormat | textFormat | An object that describes formatting details of the text to draw, such as the font, the font size, and flow direction. |
RectF | layoutRect | The size and position of the area in which the text is drawn. |
Brush | defaultForegroundBrush | The brush used to paint the text. |
Draws the specified text using the format information provided by an C1.Win.DX.DirectWrite.TextFormat object.
public void DrawText(string text, TextFormat textFormat, RectF layoutRect, Brush defaultForegroundBrush, DrawTextOptions options)
Type | Name | Description |
---|---|---|
string | text | A reference to an array of Unicode characters to draw. |
TextFormat | textFormat | An object that describes formatting details of the text to draw, such as the font, the font size, and flow direction. |
RectF | layoutRect | The size and position of the area in which the text is drawn. |
Brush | defaultForegroundBrush | The brush used to paint the text. |
DrawTextOptions | options | A value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle. The default value is C1.Win.DX.Direct2D.DrawTextOptions.None, which indicates that text should be snapped to pixel boundaries and it should not be clipped to the layout rectangle. |
Draws the specified text using the format information provided by an C1.Win.DX.DirectWrite.TextFormat object.
public void DrawText(string text, TextFormat textFormat, RectF layoutRect, Brush defaultForegroundBrush, DrawTextOptions options, MeasuringMode measuringMode)
Type | Name | Description |
---|---|---|
string | text | A reference to an array of Unicode characters to draw. |
TextFormat | textFormat | An object that describes formatting details of the text to draw, such as the font, the font size, and flow direction. |
RectF | layoutRect | The size and position of the area in which the text is drawn. |
Brush | defaultForegroundBrush | The brush used to paint the text. |
DrawTextOptions | options | A value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle. The default value is C1.Win.DX.Direct2D.DrawTextOptions.None, which indicates that text should be snapped to pixel boundaries and it should not be clipped to the layout rectangle. |
MeasuringMode | measuringMode | A value that indicates how glyph metrics are used to measure text when it is formatted. The default value is DWRITE_MEASURING_MODE_NATURAL. |
void ID2D1RenderTarget::DrawText([In, Buffer] const wchar_t* string,[In] unsigned int stringLength,[In] IDWriteTextFormat* textFormat,[In] const D2D_RECT_F* layoutRect,[In] ID2D1Brush* defaultForegroundBrush,[In] D2D1_DRAW_TEXT_OPTIONS options,[In] DWRITE_MEASURING_MODE measuringMode)
public void DrawText(string text, int stringLength, TextFormat textFormat, RectF layoutRect, Brush defaultForegroundBrush, DrawTextOptions options = DrawTextOptions.None, MeasuringMode measuringMode = MeasuringMode.Natural)
Type | Name | Description |
---|---|---|
string | text | |
int | stringLength | |
TextFormat | textFormat | |
RectF | layoutRect | |
Brush | defaultForegroundBrush | |
DrawTextOptions | options | |
MeasuringMode | measuringMode |