ImageGear for .NET User Guide > Using ImageGear for .NET > Using ImageGear.Formats.SVG Namespace |
The ImageGear.Formats.SVG Namespace provides the API to create SVG vector format, and belongs to the ImageGear21.Formats.Vector.dll assembly. This namespace provides read and write support for the SVG format.
To enable it in your project, specify the following directive:
C# Example |
Copy Code |
---|---|
using ImageGear.Formats.SVG; |
VB.NET Example |
Copy Code |
---|---|
Imports ImageGear.Formats.SVG |
ImageGear SVG vector renderer uses WPF (Windows Presentation Framework) functionality. If loaded, the SVG page is supposed to be displayed or rasterized using the ImGearVectorPage.Rasterize(), then the ImageGear21.Presentation.dll assembly should be initialized, otherwise an ImGearException will be thrown, indicating that the Presentation assembly is not initialized. In order to initialize the Presentation assembly please do following:
C# Example |
Copy Code |
---|---|
ImageGear.Display.ImGearPresentation.Initialize(); |
VB.NET Example |
Copy Code |
---|---|
ImageGear.Display.ImGearPresentation.Initialize() |
If you are going to load/save SVG files, then Presentation initialization is not required. |