Constructor Canvas
Canvas(ImageBuffer)
Initializes a new Canvas that draws onto the specified ImageBuffer.
public Canvas(ImageBuffer image)
Parameters
imageImageBufferThe 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
imageis null.- NotSupportedException
Thrown if
imageuses a pixel format other than GRAY8, RGB24, or RGBA32.