Table of Contents

Class PaintProcessor

Namespace
SixLabors.ImageSharp.Drawing.Processing
Assembly
SixLabors.ImageSharp.Drawing.dll

Defines the image processor used by Paint(IImageProcessingContext, DrawingOptions, CanvasAction) to execute a canvas callback for each image frame.

public sealed class PaintProcessor : IImageProcessor
Inheritance
PaintProcessor
Implements
Inherited Members

Constructors

PaintProcessor(DrawingOptions, CanvasAction)

Initializes a new instance of the PaintProcessor class.

public PaintProcessor(DrawingOptions options, CanvasAction action)

Parameters

options DrawingOptions

The drawing options used when creating each frame canvas.

action CanvasAction

The per-frame painting callback.

PaintProcessor(DrawingOptions, DrawingTextCache, CanvasAction)

Initializes a new instance of the PaintProcessor class.

public PaintProcessor(DrawingOptions options, DrawingTextCache textCache, CanvasAction action)

Parameters

options DrawingOptions

The drawing options used when creating each frame canvas.

textCache DrawingTextCache

The text drawing cache used by each frame canvas.

action CanvasAction

The per-frame painting callback.

Properties

Options

Gets the drawing options used when creating each frame canvas.

public DrawingOptions Options { get; }

Property Value

DrawingOptions

TextCache

Gets the text drawing cache used by each frame canvas, or null when each frame canvas owns a private cache.

public DrawingTextCache? TextCache { get; }

Property Value

DrawingTextCache

Methods

CreatePixelSpecificProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)

Creates a pixel specific IImageProcessor<TPixel> that is capable of executing the processing algorithm on an Image<TPixel>.

public IImageProcessor<TPixel> CreatePixelSpecificProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle) where TPixel : unmanaged, IPixel<TPixel>

Parameters

configuration Configuration

The configuration which allows altering default behaviour or extending the library.

source Image<TPixel>

The source image. Cannot be null.

sourceRectangle Rectangle

The Rectangle structure that specifies the portion of the image object to draw.

Returns

IImageProcessor<TPixel>

The IImageProcessor<TPixel>

Type Parameters

TPixel

The pixel type.