Table of Contents

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

path VectorPath
rule FillRule

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

path VectorPath
gradient Gradient
rule FillRule

Fill(VectorPath, Ink, FillRule)

Fills path with ink.

public void Fill(VectorPath path, Ink ink, FillRule rule = FillRule.NonZero)

Parameters

path VectorPath
ink Ink
rule FillRule

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

image IImage
x float
y float
width float
height float

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

degrees float

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

x float
y float

Stroke(VectorPath, Gradient, LineStyle)

Strokes path with gradient, laid across the path's bounds.

public void Stroke(VectorPath path, Gradient gradient, LineStyle style)

Parameters

path VectorPath
gradient Gradient
style LineStyle

Stroke(VectorPath, Ink, LineStyle)

Strokes path with ink, as style says.

public void Stroke(VectorPath path, Ink ink, LineStyle style)

Parameters

path VectorPath
ink Ink
style LineStyle

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

text string
x float
y float
style TypeStyle
anchor TextAnchor

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

a float
b float
c float
d float
e float
f float

Translate(float, float)

Moves the origin by (x, y).

public void Translate(float x, float y)

Parameters

x float
y float