Table of Contents

Constructor Canvas

Namespace
LMKit.Graphics.Drawing
Assembly
LM-Kit.NET.dll

Canvas(ImageBuffer)

Initializes a new Canvas that draws onto the specified ImageBuffer.

public Canvas(ImageBuffer image)

Parameters

image ImageBuffer

The image buffer to draw onto. Must use one of the supported pixel formats: GRAY8, RGB24, or RGBA32.

Examples

var image = new ImageBuffer(640, 480, ImagePixelFormat.RGB24);
var canvas = new Canvas(image);

Exceptions

ArgumentNullException

Thrown if image is null.

NotSupportedException

Thrown if image uses a pixel format other than GRAY8, RGB24, or RGBA32.