PeachDrawing.Core
PeachDrawing.Core.Canvas
Canvas.BeginRasterSurface(Rect, Nullable<double>) Method
Asks this graphics for a pixel surface to paint an effect PDF cannot express as vector content (a blur, a cross-channel colour filter, ...) into. The returned region has this graphics’ own coordinate system, so the same paint code that would have drawn to this graphics draws to it unchanged; when finished, hand the surface back through DrawRaster(RasterSurface).
public virtual PeachDrawing.Core.RasterRegion? BeginRasterSurface(PeachDrawing.Core.Rect layoutBounds, System.Nullable<double> dpiOverride=null);
Parameters
layoutBounds Rect
the region to cover, in this graphics’ layout units
dpiOverride System.Nullable<System.Double>
pixels per inch of paper for this surface; null uses the document’s rasterization DPI
Returns
RasterRegion
null when this graphics cannot rasterize (a measure-only pass, a test double), the region is empty, or it
cannot be allocated - callers fall back to whatever they did before the raster backend existed.