Class DrawTextExtensions
Adds extensions that allow the drawing of text on an image.
Inherited Members
Namespace: SixLabors.ImageSharp.Drawing.Processing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public static class DrawTextExtensions
Methods
| Improve this Doc View SourceDrawText(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 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, IBrush, 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, IBrush brush, PointF location)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image processing context. |
DrawingOptions | drawingOptions | The drawing options. |
String | text | The text to draw. |
Font | font | The font. |
IBrush | brush | The brush used to fill the text. |
PointF | location | The location. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, DrawingOptions, String, Font, IBrush, IPen, 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, IBrush brush, IPen pen, PointF location)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image processing context. |
DrawingOptions | drawingOptions | The drawing options. |
String | text | The text to draw. |
Font | font | The font. |
IBrush | brush | The brush used to fill the text. |
IPen | pen | The pen used to outline the text. |
PointF | location | The location. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, DrawingOptions, String, Font, IPen, 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, IPen pen, PointF location)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image processing context. |
DrawingOptions | drawingOptions | The drawing options. |
String | text | The text to draw. |
Font | font | The font. |
IPen | pen | The pen used to outline the text. |
PointF | location | The location. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, DrawingOptions, TextOptions, String, IBrush, IPen)
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, TextOptions textOptions, string text, IBrush brush, IPen pen)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image processing context. |
DrawingOptions | drawingOptions | The drawing options. |
TextOptions | textOptions | The text rendering options. |
String | text | The text to draw. |
IBrush | brush | The brush used to fill the text. |
IPen | 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 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, IBrush, PointF)
Draws the text onto the image filled via the brush.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, string text, Font font, IBrush brush, PointF location)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image processing context. |
String | text | The text to draw. |
Font | font | The font. |
IBrush | brush | The brush used to fill the text. |
PointF | location | The location. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, String, Font, IBrush, IPen, 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, IBrush brush, IPen pen, PointF location)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image processing context. |
String | text | The text to draw. |
Font | font | The font. |
IBrush | brush | The brush used to fill the text. |
IPen | pen | The pen used to outline the text. |
PointF | location | The location. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, String, Font, IPen, PointF)
Draws the text onto the image outlined via the pen.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, string text, Font font, IPen pen, PointF location)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image processing context. |
String | text | The text to draw. |
Font | font | The font. |
IPen | pen | The pen used to outline the text. |
PointF | location | The location. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, TextOptions, 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, TextOptions textOptions, string text, Color color)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image processing context. |
TextOptions | textOptions | The text rendering options. |
String | text | The text to draw. |
Color | color | The color. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, TextOptions, String, IBrush)
Draws the text using the given options onto the image filled via the brush.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, TextOptions textOptions, string text, IBrush brush)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image processing context. |
TextOptions | textOptions | The text rendering options. |
String | text | The text to draw. |
IBrush | brush | The brush used to fill the text. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, TextOptions, String, IBrush, IPen)
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, TextOptions textOptions, string text, IBrush brush, IPen pen)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image processing context. |
TextOptions | textOptions | The text rendering options. |
String | text | The text to draw. |
IBrush | brush | The brush used to fill the text. |
IPen | pen | The pen used to outline the text. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |
DrawText(IImageProcessingContext, TextOptions, String, IPen)
Draws the text using the given options onto the image outlined via the pen.
Declaration
public static IImageProcessingContext DrawText(this IImageProcessingContext source, TextOptions textOptions, string text, IPen pen)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image processing context. |
TextOptions | textOptions | The text rendering options. |
String | text | The text to draw. |
IPen | pen | The pen used to outline the text. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The |