Table of Contents

Class AffineTransformProcessor

Namespace
SixLabors.ImageSharp.Processing.Processors.Transforms
Assembly
SixLabors.ImageSharp.dll

Defines an affine transformation applicable on an Image.

public class AffineTransformProcessor : CloningImageProcessor, ICloningImageProcessor, IImageProcessor
Inheritance
AffineTransformProcessor
Implements
Derived
Inherited Members

Constructors

AffineTransformProcessor(Matrix3x2, IResampler, Size)

Initializes a new instance of the AffineTransformProcessor class.

public AffineTransformProcessor(Matrix3x2 matrix, IResampler sampler, Size targetDimensions)

Parameters

matrix Matrix3x2

The transform matrix.

sampler IResampler

The sampler to perform the transform operation.

targetDimensions Size

The target dimensions.

Properties

DestinationSize

Gets the destination size to constrain the transformed image to.

public Size DestinationSize { get; }

Property Value

Size

Sampler

Gets the sampler to perform interpolation of the transform operation.

public IResampler Sampler { get; }

Property Value

IResampler

TransformMatrix

Gets the matrix used to supply the affine transform.

public Matrix3x2 TransformMatrix { get; }

Property Value

Matrix3x2

Methods

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

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

public override ICloningImageProcessor<TPixel> CreatePixelSpecificCloningProcessor<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

ICloningImageProcessor<TPixel>

The ICloningImageProcessor<TPixel>

Type Parameters

TPixel

The pixel type.