PeachDrawing.Core

PeachDrawing.Core.Canvas

Canvas.CreateTile(double, double) Method

Creates a fresh, independent (width x height) drawing surface for tile-based content (e.g. an SVG <pattern>’s cell): draw into the returned Graphics using ordinary Canvas calls, then use the returned Image with DrawImage(Image, Rect) - repeated calls tile it, each one a real reference to the same underlying vector content (a PDF Form XObject), never rasterized. Null when creating one isn’t supported in the current rendering context (e.g. a measure-only pass with no real PDF page to own the new object).

public abstract System.Nullable<(PeachDrawing.Core.Canvas Graphics,PeachDrawing.Core.Image Image)> CreateTile(double width, double height);

Parameters

width System.Double

height System.Double

Returns

System.Nullable<<Canvas,Image>>

Remarks

The returned Graphics’s own CurrentTransform starts seeded from this graphics’ current one, same as BeginRasterSurface(Rect, Nullable<double>)’s (see its doc remarks for why) - a caller implementing this should seed it too, or a reader consulting CurrentTransform inside the tile gets a coordinate space it can’t relate back to anything outside the tile.