[]
        
(Showing Draft Content)

GrapeCity.Documents.Svg.GcSvgDocument

GcSvgDocument Class

Represents an SVG document.

Inheritance
GcSvgDocument
Implements
Namespace: GrapeCity.Documents.Svg
Assembly: DS.Documents.Imaging.dll
Syntax
public class GcSvgDocument : IDisposable
Public Class GcSvgDocument
    Implements IDisposable

Constructors

Name Description
GcSvgDocument()

Initializes an empty instance of the GcSvgDocument class.

Properties

Name Description
Cultures

Gets or sets the list of cultures to match values of the 'systemLanguage' attribute of SVG elements.

If this list is empty the language is taken from the current thread's CurrentCulture.

CurrentColor

Gets or sets the currentColor value used by the SVG renderer.

CursiveFonts

Gets or sets the list of font names belonging to the Cursive font family.

DefaultCursiveFonts

Gets the default list of font names belonging to the Cursive font family.

DefaultFantasyFonts

Gets the default list of font names belonging to the Fantasy font family.

DefaultMonospaceFonts

Gets the default list of font names belonging to the Serif font family.

DefaultSansSerifFonts

Gets the default list of font names belonging to the SansSerif font family.

DefaultSerifFonts

Gets the default list of font names belonging to the Serif font family.

FantasyFonts

Gets or sets the list of font names belonging to the Fantasy font family.

FontCollection

Gets or sets the custom font collection used for searching fonts and font fallbacks.

FontFallbackScope

Gets or sets a value specifying the scope for searching fallback fonts for the glyphs missing in the mentioned type faces.

IsDisposed

Gets a value indicating whether the GcSvgDocument has been disposed of.

MonospaceFonts

Gets or sets the list of font names belonging to the Monospace font family.

RestrictedFontLookup

Gets or sets a value indicating whether the fonts should be searched in the custom collection only, if any specified, not in the system collection of fonts. The default is false.

RootSvg

Gets the root SVG element.

SansSerifFonts

Gets or sets the list of font names belonging to the SansSerif font family.

SerifFonts

Gets or sets the list of font names belonging to the Serif font family.

Methods

Name Description
ClearNamespacePrefixes()

Removes all namespace prefixes except "svg", "xlink", and "xml".

Dispose()

Releases unmanaged resources used by this object.

FromFile(string)

Creates a new GcSvgDocument from a specified SVG file.

FromStream(Stream)

Creates a new GcSvgDocument from a specified SVG data stream.

The stream will be closed after reading the SVG data. To keep the stream open, use the FromStream(Stream, bool) overload and pass true in the leaveOpen parameter.

FromStream(Stream, bool)

Creates a new GcSvgDocument from a specified SVG data stream, optionally leaving the stream open.

FromString(string)

Creates a new GcSvgDocument from a specified SVG string data.

FromSvgz(byte[])

Creates a new GcSvgDocument from binary data in SVGZ format.

GetElementByID(string)

Gets an SvgElement with the specified id, or null if nothing was found.

GetElementsByClass(string)

Gets a list of SvgElements with the specified className.

GetIntrinsicSize(SvgLengthUnits)

Calculates the intrinsic size of the SVG viewport, in specified units. The following units are supported:

GetNamespaceByPrefix(string)

Searches for a namespace with a specified prefix.

GetNamespacePrefixes()

Returns an array with all registered namespace prefixes.

GetPrefixByNamespace(string)

Searches for a prefix associated with a specified namespace.

Measure(PointF, float)

Calculates the content bounds of an SVG document when its viewport is drawn at a specified point.

Measure(RectangleF)

Calculates the content bounds of an SVG document, resizing the SVG viewport to fit into a specified rectangle.

RegisterNamespacePrefix(string, string)

Registers prefix as a namespace prefix for the ns namespace.

Save(Stream, XmlWriterSettings)

Saves the current GcSvgDocument to a Stream in SVG format.

Save(TextWriter, XmlWriterSettings)

Saves the current GcSvgDocument to a TextWriter in SVG format.

Save(string, XmlWriterSettings)

Saves the current GcSvgDocument to a file in SVG format.

Save(StringBuilder, XmlWriterSettings)

Saves the current GcSvgDocument to a StringBuilder in SVG format.

ToSvgz()

Saves the current GcSvgDocument to a byte array in SVGZ format.

UnregisterNamespacePrefix(string)

Unregisters a specified namespace prefix.