Class DrawTextExtensions
Adds extensions that allow the drawing of text.
Inherited Members
Namespace: SixLabors.ImageSharp.Drawing.Processing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public static class DrawTextExtensions
Methods
| Edit this page 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 IImageProcessingContext to allow chaining of operations. |
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 IImageProcessingContext to allow chaining of operations. |
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 IImageProcessingContext to allow chaining of operations. |
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 IImageProcessingContext to allow chaining of operations. |
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 IImageProcessingContext to allow chaining of operations. |
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 IImageProcessingContext to allow chaining of operations. |
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 IImageProcessingContext to allow chaining of operations. |
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 IImageProcessingContext to allow chaining of operations. |
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 IImageProcessingContext to allow chaining of operations. |
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 IImageProcessingContext to allow chaining of operations. |
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 IImageProcessingContext to allow chaining of operations. |
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 IImageProcessingContext to allow chaining of operations. |
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 IImageProcessingContext to allow chaining of operations. |