PeachDrawing.Core
PeachDrawing.Core.ColorGlyphs
CanvasColorGlyphTarget Class
An IColorGlyphTarget that draws onto any Canvas with the canvas’s own path, clip, brush and blend-mode primitives, so every backend gets color glyphs without implementing anything color-font specific. Rectangles, brush geometry and the painter’s own coordinates are in the canvas’s layout units (what DrawRectangle(Brush, double, double, double, double) reads), while a GraphicsPath - the glyph outlines, and the bounds a complement clip is cut from - is read by a canvas as points, so those are divided by PixelsPerPoint on the way in (nothing changes on a canvas with one unit to the point).
public sealed class CanvasColorGlyphTarget : PeachDrawing.Core.ColorGlyphs.IColorGlyphTarget
Inheritance System.Object → CanvasColorGlyphTarget
Implements IColorGlyphTarget
| Constructors | |
|---|---|
| CanvasColorGlyphTarget(Canvas) | Creates a target that draws onto canvas. |
| Properties | |
|---|---|
| SupportsAdditiveComposite | Whether the canvas adds Plus composites (true for a pixel canvas such as RasterCanvas; default false). |
| SupportsPeriodicConeGradients | Whether the canvas’s radial brushes repeat between circles with different centers (true for a pixel canvas such as RasterCanvas; default false). |
| 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). |