Table of Contents

Class Artwork

Namespace
Rustaveli.Pdf
Assembly
Rustaveli.Pdf.dll

Vector artwork: paths filled and stroked, text and transforms, drawn at a size of its own and placed in a frame as an image is, scaled to fit. It stays vector in the PDF, sharp at any size.

public sealed class Artwork
Inheritance
Artwork
Inherited Members

Properties

Size

The artwork's own size, in points, before it is scaled to its frame.

public Extent Size { get; }

Property Value

Extent

Methods

Draw(float, float, Action<ArtworkComposer>)

Artwork width by height points, drawn by draw.

public static Artwork Draw(float width, float height, Action<ArtworkComposer> draw)

Parameters

width float
height float
draw Action<ArtworkComposer>

Returns

Artwork

FromSvg(Stream)

The artwork the SVG document in svg draws, read in the encoding the document declares, at the size it gives itself, a CSS pixel to three quarters of a point. The stream is read from where it stands and is left open: it is the caller's to dispose.

public static Artwork FromSvg(Stream svg)

Parameters

svg Stream

Returns

Artwork

Remarks

Shapes, paths, transforms, clip paths, linear gradients, text, embedded images and styles are drawn; radial gradients take the mean of their colours, and filters, masks, patterns and markers are left out. Nothing the document refers to outside itself is fetched.

Exceptions

FormatException

The bytes are not an SVG document.

FromSvg(string)

The artwork an SVG document draws, at the size it gives itself, a CSS pixel to three quarters of a point.

public static Artwork FromSvg(string svg)

Parameters

svg string

Returns

Artwork

Remarks

Shapes, paths, transforms, clip paths, linear gradients, text, embedded images and styles are drawn; radial gradients take the mean of their colours, and filters, masks, patterns and markers are left out. Nothing the document refers to outside itself is fetched.

Exceptions

FormatException

The text is not an SVG document.

FromSvgFile(string)

The artwork an SVG document draws, at the size it gives itself, a CSS pixel to three quarters of a point.

public static Artwork FromSvgFile(string path)

Parameters

path string

Returns

Artwork

Remarks

Shapes, paths, transforms, clip paths, linear gradients, text, embedded images and styles are drawn; radial gradients take the mean of their colours, and filters, masks, patterns and markers are left out. Nothing the document refers to outside itself is fetched.

Exceptions

FormatException

The text is not an SVG document.