PeachDrawing.Core
PeachDrawing.Core.Canvas
Canvas.DrawImageMasked(Image, Image, Rect) Method
Draws image (a tile from CreateTile(double, double)) at
destRect with maskImage (another same-adapter tile,
sharing image’s own local width/height) applied as a luminosity soft
mask, scoped to just this one placement. White areas of maskImage are
fully visible, black fully transparent, matching PDF’s/SVG’s own <mask>
semantics. Deliberately NOT a “push mask, draw normally, pop mask” pair (which an earlier
version of this API was): a tile’s own content is Y-flipped relative to its own (small)
size, not the page’s, so positioning it correctly requires the same explicit destRect
placement DrawImage(Image, Rect) already uses for pattern tiles - relying
on whatever transform happens to be ambient in the page’s own content stream at some
arbitrary “push” point silently mispositions the mask relative to the content it’s meant
to mask. A no-op if either image wasn’t created via CreateTile(double, double) on this same
Canvas.
public abstract void DrawImageMasked(PeachDrawing.Core.Image image, PeachDrawing.Core.Image maskImage, PeachDrawing.Core.Rect destRect);
Parameters
image Image
maskImage Image
destRect Rect