skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class SvgDocument

Inheritance
System.Object
SvgElement
SvgFragment
SvgDocument
Inherited Members
SvgFragment.Namespace
SvgFragment.PushTransforms(ISvgRenderer)
SvgFragment.Render(ISvgRenderer)
SvgFragment.GetDimensions()
SvgFragment.DeepCopy()
SvgFragment.DeepCopy<T>()
SvgFragment.WriteStartElement(XmlTextWriter)
SvgFragment.ISvgBoundable.Location
SvgFragment.ISvgBoundable.Size
SvgFragment.ISvgBoundable.Bounds
SvgFragment.X
SvgFragment.Y
SvgFragment.Width
SvgFragment.Height
SvgFragment.Overflow
SvgFragment.ViewBox
SvgFragment.AspectRatio
SvgFragment.FontSize
SvgFragment.FontFamily
SvgFragment.SpaceHandling
SvgFragment.Path
SvgFragment.Bounds
SvgElement.AutoPublishEvents
SvgElement.PrivateFonts
SvgElement.AddStyle(String, String, Int32)
SvgElement.FlushStyles(Boolean)
SvgElement.ContainsAttribute(String)
SvgElement.TryGetAttribute(String, String)
SvgElement.Descendants()
SvgElement.HasChildren()
SvgElement.GetAttribute<TAttributeType>(String, Boolean, TAttributeType)
SvgElement.PopTransforms(ISvgRenderer)
SvgElement.ISvgTransformable.PushTransforms(ISvgRenderer)
SvgElement.ISvgTransformable.PopTransforms(ISvgRenderer)
SvgElement.TransformedBounds(RectangleF)
SvgElement.SetAndForceUniqueID(String, Boolean, Action<SvgElement, String, String>)
SvgElement.AddElement(SvgElement, Int32)
SvgElement.RemoveElement(SvgElement)
SvgElement.InitialiseFromXML(XmlTextReader, SvgDocument)
SvgElement.RenderElement(ISvgRenderer)
SvgElement.ShouldWriteElement()
SvgElement.WriteEndElement(XmlTextWriter)
SvgElement.WriteAttributes(XmlTextWriter)
SvgElement.WriteChildren(XmlTextWriter)
SvgElement.RenderChildren(ISvgRenderer)
SvgElement.AddPaths(SvgElement, GraphicsPath)
SvgElement.GetPaths(SvgElement, ISvgRenderer)
SvgElement.Clone()
SvgElement.ISvgNode.DeepCopy()
SvgElement.OnAttributeChanged(AttributeEventArgs)
SvgElement.OnContentChanged(ContentEventArgs)
SvgElement.RegisterEvents(ISvgEventCaller)
SvgElement.UnregisterEvents(ISvgEventCaller)
SvgElement.CreateMouseEventAction(Action<Object, MouseArg>)
SvgElement.RaiseMouseClick(Object, MouseArg)
SvgElement.RaiseMouseDown(Object, MouseArg)
SvgElement.RaiseMouseUp(Object, MouseArg)
SvgElement.RaiseMouseMove(Object, MouseArg)
SvgElement.RaiseMouseOver(Object, MouseArg)
SvgElement.RaiseMouseOut(Object, MouseArg)
SvgElement.OnMouseScroll(Int32, Boolean, Boolean, Boolean, String)
SvgElement.RaiseMouseScroll(Object, MouseScrollArg)
SvgElement.InvalidateChildPaths()
SvgElement.FixOpacityValue(Single)
SvgElement.ValidateFontFamily(String, SvgDocument)
SvgElement.ElementName
SvgElement.Color
SvgElement.Content
SvgElement.Events
SvgElement.Children
SvgElement.Nodes
SvgElement.Parent
SvgElement.Parents
SvgElement.ParentsAndSelf
SvgElement.OwnerDocument
SvgElement.Attributes
SvgElement.Writing
SvgElement.CustomAttributes
SvgElement.Transforms
SvgElement.ID
SvgElement.IsPathDirty
SvgElement.Fill
SvgElement.Stroke
SvgElement.FillRule
SvgElement.FillOpacity
SvgElement.StrokeWidth
SvgElement.StrokeLineCap
SvgElement.StrokeLineJoin
SvgElement.StrokeMiterLimit
SvgElement.StrokeDashArray
SvgElement.StrokeDashOffset
SvgElement.StrokeOpacity
SvgElement.Opacity
SvgElement.ShapeRendering
SvgElement.ColorInterpolation
SvgElement.ColorInterpolationFilters
SvgElement.Visibility
SvgElement.Display
SvgElement.TextAnchor
SvgElement.BaselineShift
SvgElement.FontStyle
SvgElement.FontVariant
SvgElement.TextDecoration
SvgElement.FontWeight
SvgElement.FontStretch
SvgElement.TextTransformation
SvgElement.Font
SvgElement.Load
SvgElement.ChildAdded
SvgElement.AttributeChanged
SvgElement.ContentChanged
SvgElement.Click
SvgElement.MouseDown
SvgElement.MouseUp
SvgElement.MouseMove
SvgElement.MouseScroll
SvgElement.MouseOver
SvgElement.MouseOut
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.Svg
Assembly: TelerikCommon.dll

Syntax

public class SvgDocument : SvgFragment, ISvgElement, ISvgTransformable, ICloneable, ISvgNode, ISvgViewPort, ISvgBoundable, ITypeDescriptorContext, IServiceProvider

Constructors

SvgDocument()

Declaration
public SvgDocument()

Fields

PointsPerInch

Declaration
public static readonly int PointsPerInch
Field Value
System.Int32

Properties

BaseUri

Declaration
public Uri BaseUri { get; set; }
Property Value
System.Uri

ExternalCSSHref

Declaration
public string ExternalCSSHref { get; set; }
Property Value
System.String

IdManager

Declaration
protected virtual SvgElementIdManager IdManager { get; }
Property Value
SvgElementIdManager

Ppi

Declaration
public int Ppi { get; set; }
Property Value
System.Int32

SkipGdiPlusCapabilityCheck

Declaration
public static bool SkipGdiPlusCapabilityCheck { get; set; }
Property Value
System.Boolean

Methods

Draw()

Declaration
public virtual Bitmap Draw()
Returns
System.Drawing.Bitmap

Draw(Bitmap)

Declaration
public virtual void Draw(Bitmap bitmap)
Parameters
System.Drawing.Bitmap bitmap

Draw(Graphics)

Declaration
public void Draw(Graphics graphics)
Parameters
System.Drawing.Graphics graphics

Draw(Graphics, Nullable<SizeF>)

Declaration
public void Draw(Graphics graphics, SizeF? size)
Parameters
System.Drawing.Graphics graphics

System.Nullable<System.Drawing.SizeF> size

Draw(Int32, Int32)

Declaration
public virtual Bitmap Draw(int rasterWidth, int rasterHeight)
Parameters
System.Int32 rasterWidth

System.Int32 rasterHeight

Returns
System.Drawing.Bitmap

Draw(ISvgRenderer)

Declaration
public void Draw(ISvgRenderer renderer)
Parameters
ISvgRenderer renderer

EnsureSystemIsGdiPlusCapable()

Declaration
public static void EnsureSystemIsGdiPlusCapable()

FromSvg<T>(String)

Declaration
public static T FromSvg<T>(string svg)
    where T : SvgDocument, new()
Parameters
System.String svg

Returns
T

Type Parameters
T

GetElementById(String)

Declaration
public virtual SvgElement GetElementById(string id)
Parameters
System.String id

Returns
SvgElement

GetElementById<TSvgElement>(String)

Declaration
public virtual TSvgElement GetElementById<TSvgElement>(string id)
    where TSvgElement : SvgElement
Parameters
System.String id

Returns
TSvgElement

Type Parameters
TSvgElement

Open(String)

Declaration
public static SvgDocument Open(string path)
Parameters
System.String path

Returns
SvgDocument

Open(XmlDocument)

Declaration
public static SvgDocument Open(XmlDocument document)
Parameters
System.Xml.XmlDocument document

Returns
SvgDocument

Open<T>(Stream)

Declaration
public static T Open<T>(Stream stream)
    where T : SvgDocument, new()
Parameters
System.IO.Stream stream

Returns
T

Type Parameters
T

Open<T>(Stream, Dictionary<String, String>)

Declaration
public static T Open<T>(Stream stream, Dictionary<string, string> entities)
    where T : SvgDocument, new()
Parameters
System.IO.Stream stream

System.Collections.Generic.Dictionary<System.String, System.String> entities

Returns
T

Type Parameters
T

Open<T>(String)

Declaration
public static T Open<T>(string path)
    where T : SvgDocument, new()
Parameters
System.String path

Returns
T

Type Parameters
T

Open<T>(String, Dictionary<String, String>)

Declaration
public static T Open<T>(string path, Dictionary<string, string> entities)
    where T : SvgDocument, new()
Parameters
System.String path

System.Collections.Generic.Dictionary<System.String, System.String> entities

Returns
T

Type Parameters
T

OpenAsBitmap(String)

Declaration
public static Bitmap OpenAsBitmap(string path)
Parameters
System.String path

Returns
System.Drawing.Bitmap

OpenAsBitmap(XmlDocument)

Declaration
public static Bitmap OpenAsBitmap(XmlDocument document)
Parameters
System.Xml.XmlDocument document

Returns
System.Drawing.Bitmap

OverwriteIdManager(SvgElementIdManager)

Declaration
public void OverwriteIdManager(SvgElementIdManager manager)
Parameters
SvgElementIdManager manager

RasterizeDimensions(ref SizeF, Int32, Int32)

Declaration
public virtual void RasterizeDimensions(ref SizeF size, int rasterWidth, int rasterHeight)
Parameters
System.Drawing.SizeF size

System.Int32 rasterWidth

System.Int32 rasterHeight

SystemIsGdiPlusCapable()

Declaration
public static bool SystemIsGdiPlusCapable()
Returns
System.Boolean

Write(Stream, Boolean)

Declaration
public void Write(Stream stream, bool useBom = true)
Parameters
System.IO.Stream stream

System.Boolean useBom

Write(String, Boolean)

Declaration
public void Write(string path, bool useBom = true)
Parameters
System.String path

System.Boolean useBom

Write(XmlTextWriter)

Declaration
public override void Write(XmlTextWriter writer)
Parameters
System.Xml.XmlTextWriter writer

Overrides
SvgElement.Write(XmlTextWriter)

WriteToString()

Declaration
public string WriteToString()
Returns
System.String

Events

DocumentDrawException

Declaration
public event SvgDocumentDrawExceptionEventHandler DocumentDrawException
Event Type
SvgDocumentDrawExceptionEventHandler

Explicit Interface Implementations

IServiceProvider.GetService(Type)

Declaration
object IServiceProvider.GetService(Type serviceType)
Parameters
System.Type serviceType

Returns
System.Object

Implements
System.IServiceProvider.GetService(System.Type)

Extension Methods

SvgExtentions.GetXML(SvgDocument)
SvgExtentions.GetXML(SvgElement)
SvgExtentions.HasNonEmptyCustomAttribute(SvgElement, String)
SvgExtentions.ApplyRecursive(SvgElement, Action<SvgElement>)
SvgExtentions.ApplyRecursiveDepthFirst(SvgElement, Action<SvgElement>)
SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.