Table of Contents

Class DrawingCanvasFactoryExtensions

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

Extension methods for creating drawing canvas instances over ImageSharp image frames.

public static class DrawingCanvasFactoryExtensions
Inheritance
DrawingCanvasFactoryExtensions
Inherited Members

Methods

CreateCanvas(ImageFrame, Configuration, DrawingOptions, params IPath[])

Creates a drawing canvas over an existing image frame.

public static DrawingCanvas CreateCanvas(this ImageFrame frame, Configuration configuration, DrawingOptions options, params IPath[] clipPaths)

Parameters

frame ImageFrame

The frame backing the canvas.

configuration Configuration

The configuration to use for this canvas instance.

options DrawingOptions

Initial drawing options for this canvas instance.

clipPaths IPath[]

Initial clip paths for this canvas instance.

Returns

DrawingCanvas

A drawing canvas targeting frame.

Remarks

The caller owns the returned canvas and must dispose it to replay recorded work into the frame.

CreateCanvas<TPixel>(ImageFrame<TPixel>, Configuration, DrawingOptions, params IPath[])

Creates a drawing canvas over an existing typed image frame.

public static DrawingCanvas CreateCanvas<TPixel>(this ImageFrame<TPixel> frame, Configuration configuration, DrawingOptions options, params IPath[] clipPaths) where TPixel : unmanaged, IPixel<TPixel>

Parameters

frame ImageFrame<TPixel>

The frame backing the canvas.

configuration Configuration

The configuration to use for this canvas instance.

options DrawingOptions

Initial drawing options for this canvas instance.

clipPaths IPath[]

Initial clip paths for this canvas instance.

Returns

DrawingCanvas

A drawing canvas targeting frame.

Type Parameters

TPixel

The pixel format.

Remarks

The caller owns the returned canvas and must dispose it to replay recorded work into the frame.