Class ArtworkComposer
- Namespace
- Rustaveli.Pdf
- Assembly
- Rustaveli.Pdf.dll
Draws artwork, a step at a time, as a pen on a page would: fills, strokes and text, under transforms and clips that last until the state saved before them is restored.
public sealed class ArtworkComposer
- Inheritance
-
ArtworkComposer
- Inherited Members
Methods
Clip(VectorPath, FillRule)
Confines what follows, until the next RestoreState(), to the inside of path.
public void Clip(VectorPath path, FillRule rule = FillRule.NonZero)
Parameters
pathVectorPathruleFillRule
Fill(VectorPath, Gradient, FillRule)
Fills path with gradient, laid across the path's bounds.
public void Fill(VectorPath path, Gradient gradient, FillRule rule = FillRule.NonZero)
Parameters
pathVectorPathgradientGradientruleFillRule
Fill(VectorPath, Ink, FillRule)
Fills path with ink.
public void Fill(VectorPath path, Ink ink, FillRule rule = FillRule.NonZero)
Parameters
pathVectorPathinkInkruleFillRule
Image(IImage, float, float, float, float)
Places image in the box at (x, y), stretched to fill it.
public void Image(IImage image, float x, float y, float width, float height)
Parameters
RestoreState()
Returns to the transforms and clips in force at the matching SaveState().
public void RestoreState()
Rotate(float)
Turns what follows by degrees, clockwise about the origin.
public void Rotate(float degrees)
Parameters
degreesfloat
SaveState()
Saves the transforms and clips in force, to be restored by RestoreState().
public void SaveState()
Scale(float, float)
Scales what follows, across and down.
public void Scale(float x, float y)
Parameters
Stroke(VectorPath, Gradient, LineStyle)
Strokes path with gradient, laid across the path's bounds.
public void Stroke(VectorPath path, Gradient gradient, LineStyle style)
Parameters
pathVectorPathgradientGradientstyleLineStyle
Stroke(VectorPath, Ink, LineStyle)
Strokes path with ink, as style says.
public void Stroke(VectorPath path, Ink ink, LineStyle style)
Parameters
pathVectorPathinkInkstyleLineStyle
Text(string, float, float, TypeStyle, TextAnchor)
Sets text in one line on the baseline at y, starting, centred on or ending
at x as anchor says.
public void Text(string text, float x, float y, TypeStyle style, TextAnchor anchor = TextAnchor.Start)
Parameters
textstringxfloatyfloatstyleTypeStyleanchorTextAnchor
Transform(float, float, float, float, float, float)
Transforms what follows by the matrix mapping (x, y) to (a·x + c·y + e, b·x + d·y + f), as SVG's
matrix(a b c d e f) does.
public void Transform(float a, float b, float c, float d, float e, float f)
Parameters
Translate(float, float)
Moves the origin by (x, y).
public void Translate(float x, float y)