PeachDrawing.Core
PeachDrawing.Core.CanvasParagraphExtensions
CanvasParagraphExtensions.DrawParagraph Method
| Overloads | |
|---|---|
| DrawParagraph(this Canvas, ParagraphLayout, PaintPoint, PaintColor) | Draws every run of layout in one color. |
| DrawParagraph(this Canvas, ParagraphLayout, PaintPoint, Func<PlacedRun,ParagraphPaint>, Action<Canvas,PlacedRun,Rect>) | Draws every run of layout, painted as paintForRun says. |
CanvasParagraphExtensions.DrawParagraph(this Canvas, ParagraphLayout, PaintPoint, PaintColor) Method
Draws every run of layout in one color.
public static void DrawParagraph(this PeachDrawing.Core.Canvas canvas, PeachDrawing.Text.Layout.ParagraphLayout layout, PeachDrawing.Core.PaintPoint origin, PeachDrawing.Core.PaintColor color);
Parameters
canvas Canvas
the canvas to draw onto
layout ParagraphLayout
the laid-out paragraph
origin PaintPoint
where the top-left corner of the layout goes
color PaintColor
the color of the text
CanvasParagraphExtensions.DrawParagraph(this Canvas, ParagraphLayout, PaintPoint, Func<PlacedRun,ParagraphPaint>, Action<Canvas,PlacedRun,Rect>) Method
Draws every run of layout, painted as paintForRun says.
public static void DrawParagraph(this PeachDrawing.Core.Canvas canvas, PeachDrawing.Text.Layout.ParagraphLayout layout, PeachDrawing.Core.PaintPoint origin, System.Func<PeachDrawing.Text.Layout.PlacedRun,PeachDrawing.Core.ParagraphPaint> paintForRun, System.Action<PeachDrawing.Core.Canvas,PeachDrawing.Text.Layout.PlacedRun,PeachDrawing.Core.Rect>? drawInlineBox=null);
Parameters
canvas Canvas
the canvas to draw onto
layout ParagraphLayout
the laid-out paragraph
origin PaintPoint
where the top-left corner of the layout goes
paintForRun System.Func<PlacedRun,ParagraphPaint>
the color and decorations of a run; called once for each run of text, including a generated hyphen or ellipsis
drawInlineBox System.Action<Canvas,PlacedRun,Rect>
draws an inline box (see AddInlineBox(InlineBox)): given the canvas, the run that stands for the box and the box’s bounds already moved by origin. Boxes are skipped when this is null.