Table of Contents

Class SvgWriter

Namespace
GeometryHelper.Export
Assembly
GeometryHelper.dll

Draws shapes in the plane as an SVG picture, to look at in a browser.

public sealed class SvgWriter
Inheritance
SvgWriter
Inherited Members

Remarks

The picture is fitted round everything added, with Y pointing up as in the drawing, and every line is drawn the same width however far the picture is zoomed. Arcs are drawn as arcs, not as chords. Each shape takes a stroke colour and, where it encloses something, a fill — any colour SVG knows, such as "red" or "#3070c0".

new SvgWriter().Add(plate, "black", "#eeeeee").Add(cut, "red").Save("cut.svg");

Methods

Add(GeoArc2, string)

Adds an arc.

Add(GeoCircle2, string, string)

Adds a circle.

Add(GeoEdge2, string)

Adds an edge, straight or curved.

Add(GeoFace2, string, string)

Adds a face, its holes left empty.

Add(GeoLine2, string)

Adds a segment.

Add(GeoPoint2, string)

Adds a point, drawn as a dot.

Add(GeoPolygon2, string, string)

Adds a polygon.

Add(GeoPolygonArc2, string, string)

Adds a loop with arcs.

Add(GeoPolyline2, string)

Adds a chain.

Add(GeoPolylineArc2, string)

Adds a chain with arcs.

Add(GeoRectangle2, string, string)

Adds a rectangle.

Save(string)

Writes the picture to a path, replacing whatever is there.

ToString()

Gets the picture as SVG text.

WriteTo(TextWriter)

Writes the picture to a writer.