Class DrawTextProcessor
Defines a processor to draw text on an
Namespace: SixLabors.ImageSharp.Drawing.Processing.Processors.Text
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public class DrawTextProcessor : IImageProcessor
Constructors
| Improve this Doc View SourceDrawTextProcessor(DrawingOptions, String, Font, IBrush, IPen, PointF)
Initializes a new instance of the DrawTextProcessor class.
Declaration
public DrawTextProcessor(DrawingOptions options, string text, Font font, IBrush brush, IPen pen, PointF location)
Parameters
| Type | Name | Description |
|---|---|---|
| DrawingOptions | options | The options |
| String | text | The text we want to render |
| Font | font | The font we want to render with |
| IBrush | brush | The brush to source pixel colors from. |
| IPen | pen | The pen to outline text with. |
| PointF | location | The location on the image to start drawing the text from. |
Properties
| Improve this Doc View SourceBrush
Gets the brush used to fill the glyphs.
Declaration
public IBrush Brush { get; }
Property Value
| Type | Description |
|---|---|
| IBrush |
Font
Gets the font used to render the text.
Declaration
public Font Font { get; }
Property Value
| Type | Description |
|---|---|
| Font |
Location
Gets the location to draw the text at.
Declaration
public PointF Location { get; }
Property Value
| Type | Description |
|---|---|
| PointF |
Options
Gets the DrawingOptions defining blending modes and text-specific drawing settings.
Declaration
public DrawingOptions Options { get; }
Property Value
| Type | Description |
|---|---|
| DrawingOptions |
Pen
Gets the pen used for outlining the text, if Null then we will not outline
Declaration
public IPen Pen { get; }
Property Value
| Type | Description |
|---|---|
| IPen |
Text
Gets the text to draw.
Declaration
public string Text { get; }
Property Value
| Type | Description |
|---|---|
| String |
Methods
| Improve this Doc View SourceCreatePixelSpecificProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)
Declaration
public IImageProcessor<TPixel> CreatePixelSpecificProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle)
where TPixel : struct, IPixel<TPixel>
Parameters
| Type | Name | Description |
|---|---|---|
| Configuration | configuration | |
| Image<TPixel> | source | |
| Rectangle | sourceRectangle |
Returns
| Type | Description |
|---|---|
| IImageProcessor<TPixel> |
Type Parameters
| Name | Description |
|---|---|
| TPixel |