PeachDrawing

PeachDrawing.RasterRenderContext

RasterRenderContext.CreateCanvas(int, int, double) Method

Creates a standalone RasterCanvas canvas of exactly widthPx by heightPx device pixels. This canvas’s own coordinate convention is plain: one user-space unit is one device pixel, regardless of dpi - a Rect(0, 0, 100, 50) and a font size of 24 both mean exactly that many pixels. dpi is accepted for forward compatibility (a future encoder that tags physical resolution on save) but does not otherwise affect drawing today.

public PeachDrawing.RasterCanvas CreateCanvas(int widthPx, int heightPx, double dpi=96.0);

Parameters

widthPx System.Int32

heightPx System.Int32

dpi System.Double

Returns

RasterCanvas