Class DrawTextExtensions
Adds extensions that allow the drawing of text.
Namespace: SixLabors.ImageSharp.Drawing.Processing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public static class DrawTextExtensions : object
Methods
| Improve this Doc View SourceDrawText(IImageProcessingContext, DrawingOptions, RichTextOptions, String, Brush, Pen)
Draws the text using the given options onto the image filled via the brush then outlined via the pen.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, DrawingOptions drawingOptions, RichTextOptions textOptions, string text, Brush brush, Pen pen)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The source image processing context. |
DrawingOptions | drawingOptions | The drawing options. |
RichTextOptions | textOptions | The text rendering options. |
String | text | The text to draw. |
Brush | brush | The brush used to fill the text. |
Pen | pen | The pen used to outline the text. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, DrawingOptions, String, Font, Color, PointF)
Draws the text using the supplied drawing options onto the image filled with the given color.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, DrawingOptions drawingOptions, string text, Font font, Color color, PointF location)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The source image processing context. |
DrawingOptions | drawingOptions | The drawing options. |
String | text | The text to draw. |
Font | font | The font. |
Color | color | The color. |
PointF | location | The location. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, DrawingOptions, String, Font, Brush, PointF)
Draws the text onto the image filled via the brush.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, DrawingOptions drawingOptions, string text, Font font, Brush brush, PointF location)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The source image processing context. |
DrawingOptions | drawingOptions | The drawing options. |
String | text | The text to draw. |
Font | font | The font. |
Brush | brush | The brush used to fill the text. |
PointF | location | The location. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, DrawingOptions, String, Font, Brush, Pen, PointF)
Draws the text using the given drawing options onto the image filled via the brush then outlined via the pen.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, DrawingOptions drawingOptions, string text, Font font, Brush brush, Pen pen, PointF location)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The source image processing context. |
DrawingOptions | drawingOptions | The drawing options. |
String | text | The text to draw. |
Font | font | The font. |
Brush | brush | The brush used to fill the text. |
Pen | pen | The pen used to outline the text. |
PointF | location | The location. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, DrawingOptions, String, Font, Pen, PointF)
Draws the text onto the image outlined via the pen.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, DrawingOptions drawingOptions, string text, Font font, Pen pen, PointF location)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The source image processing context. |
DrawingOptions | drawingOptions | The drawing options. |
String | text | The text to draw. |
Font | font | The font. |
Pen | pen | The pen used to outline the text. |
PointF | location | The location. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, RichTextOptions, String, Color)
Draws the text using the supplied text options onto the image filled via the brush.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, RichTextOptions textOptions, string text, Color color)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The source image processing context. |
RichTextOptions | textOptions | The text rendering options. |
String | text | The text to draw. |
Color | color | The color. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, RichTextOptions, String, Brush)
Draws the text using the given options onto the image filled via the brush.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, RichTextOptions textOptions, string text, Brush brush)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The source image processing context. |
RichTextOptions | textOptions | The text rendering options. |
String | text | The text to draw. |
Brush | brush | The brush used to fill the text. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, RichTextOptions, String, Brush, Pen)
Draws the text using the given options onto the image filled via the brush then outlined via the pen.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, RichTextOptions textOptions, string text, Brush brush, Pen pen)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The source image processing context. |
RichTextOptions | textOptions | The text rendering options. |
String | text | The text to draw. |
Brush | brush | The brush used to fill the text. |
Pen | pen | The pen used to outline the text. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, RichTextOptions, String, Pen)
Draws the text using the given options onto the image outlined via the pen.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, RichTextOptions textOptions, string text, Pen pen)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The source image processing context. |
RichTextOptions | textOptions | The text rendering options. |
String | text | The text to draw. |
Pen | pen | The pen used to outline the text. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, String, Font, Color, PointF)
Draws the text onto the image filled with the given color.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, string text, Font font, Color color, PointF location)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The source image processing context. |
String | text | The text to draw. |
Font | font | The font. |
Color | color | The color. |
PointF | location | The location. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, String, Font, Brush, PointF)
Draws the text onto the image filled via the brush.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, string text, Font font, Brush brush, PointF location)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The source image processing context. |
String | text | The text to draw. |
Font | font | The font. |
Brush | brush | The brush used to fill the text. |
PointF | location | The location. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, String, Font, Brush, Pen, PointF)
Draws the text onto the image filled via the brush then outlined via the pen.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, string text, Font font, Brush brush, Pen pen, PointF location)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The source image processing context. |
String | text | The text to draw. |
Font | font | The font. |
Brush | brush | The brush used to fill the text. |
Pen | pen | The pen used to outline the text. |
PointF | location | The location. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, String, Font, Pen, PointF)
Draws the text onto the image outlined via the pen.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, string text, Font font, Pen pen, PointF location)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The source image processing context. |
String | text | The text to draw. |
Font | font | The font. |
Pen | pen | The pen used to outline the text. |
PointF | location | The location. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |