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
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
widthfloatheightfloatdrawAction<ArtworkComposer>
Returns
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
svgStream
Returns
Remarks
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
svgstring
Returns
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
pathstring
Returns
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.