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, TextOptions, String, IBrush, IPen)
Initializes a new instance of the DrawTextProcessor class.
Declaration
public DrawTextProcessor(DrawingOptions drawingOptions, TextOptions textOptions, string text, IBrush brush, IPen pen)
Parameters
Type | Name | Description |
---|---|---|
DrawingOptions | drawingOptions | The drawing options. |
TextOptions | textOptions | The text rendering options. |
String | text | The text we want to render |
IBrush | brush | The brush to source pixel colors from. |
IPen | pen | The pen to outline text with. |
Properties
| Improve this Doc View SourceBrush
Gets the brush used to fill the glyphs.
Declaration
public IBrush Brush { get; }
Property Value
Type | Description |
---|---|
IBrush |
DrawingOptions
Gets the DrawingOptions defining blending modes and shape drawing settings.
Declaration
public DrawingOptions DrawingOptions { get; }
Property Value
Type | Description |
---|---|
DrawingOptions |
Location
Gets the location to draw the text at.
Declaration
public PointF Location { get; }
Property Value
Type | Description |
---|---|
PointF |
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 |
TextOptions
Gets the
Declaration
public TextOptions TextOptions { get; }
Property Value
Type | Description |
---|---|
TextOptions |
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 |