Method WriteSvg
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Rendering.dll
WriteSvg(string, CadDocument, CadRenderOptions)
Draws a space of a drawing to an SVG file, replacing a file of the name: the picture of WritePng(string, CadDocument, CadRenderOptions) in
vectors, its width and height the pixels of the picture, the images in it as PNG data. It is drawn by
the renderer of the canvas, so it keeps the canvas's level of detail at the picture's size: an item under half a
pixel is one dot, a text under 5 pixels high is a solid bar of its colour and a hatch whose lines come closer than 2 pixels is a
tint. The PDF of WritePdf(string, CadDocument, string) is the full-detail form.
public static void WriteSvg(string path, CadDocument document, CadRenderOptions options)
Parameters
pathstringThe file.
documentCadDocumentThe drawing.
optionsCadRenderOptionsThe space, the part, the size and the ground; null for the defaults.
Exceptions
- ArgumentNullException
Thrown when the path or the document is null.
- ArgumentException
Thrown for the options Draw(CadDocument, CadRenderOptions) refuses.
- IOException
Thrown when the file cannot be written.