PeachDrawing.Core
PeachDrawing.Core.ColorGlyphs
IColorGlyphTarget Interface
Where a ColorGlyphPainter draws. CanvasColorGlyphTarget draws onto any Canvas; a backend with its own way of drawing (a PDF writer that also wants to measure the ink first, say) implements this directly. Every rectangle and point is in the target’s space, the space the placement given to Paint(ushort, Affine2x3, IColorGlyphTarget) maps design units into.
public interface IColorGlyphTarget
Derived
↳ CanvasColorGlyphTarget
| Properties | |
|---|---|
| SupportsAdditiveComposite | Whether PushBlendMode(PaintBlendMode) honors Plus (an additive composite). The painter asks for it, for a PLUS composite, only when this is true; otherwise it paints that composite source-over. The default is false. |
| SupportsPeriodicConeGradients | Whether a RadialColorGlyphPaint between circles with different centers may ask for Repeating (a gradient that repeats past its outer circle). The default is false, which keeps such a gradient padded. |
| Methods | |
|---|---|
| FillOutline(GlyphOutline, Affine2x3, PaintColor) | Fills the outline of one glyph, mapped through transform, with a solid color (a COLR v0 layer, or a plain glyph). |
| FillRegion(Rect, ColorGlyphPaint) | Fills region, within the current clip, with paint. |
| PopBlendMode() | Ends the blend begun by the last unmatched PushBlendMode(PaintBlendMode). |
| PopClip() | Ends the clip begun by the last unmatched PushOutlineClip(GlyphOutline, Affine2x3) or accepted PushOutlineComplementClip(GlyphOutline, Affine2x3, Rect). |
| PushBlendMode(PaintBlendMode) | Composites everything drawn until the matching PopBlendMode() over what is beneath it with mode. |
| PushOutlineClip(GlyphOutline, Affine2x3) | Restricts everything drawn until the matching PopClip() to the outline of one glyph, mapped through transform. |
| PushOutlineComplementClip(GlyphOutline, Affine2x3, Rect) | Restricts everything drawn until the matching PopClip() to the part of bounds<em>outside</em> the outline of one glyph, mapped through transform (an even-odd clip of the rectangle and the outline). The painter uses it for the Porter-Duff modes that keep what is not covered (SRC_OUT, DEST_OUT, XOR). |