Class RadSvgImage
Inheritance
Inherited Members
Namespace: Telerik.WinControls
Assembly: Telerik.WinControls.dll
Syntax
public class RadSvgImage : MarshalByRefObject, ISerializable, ICloneable, IDisposable
Constructors
RadSvgImage(SerializationInfo, StreamingContext)
This constructor is called during the deserialization process. https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable?view=netframework-2.0
Declaration
protected RadSvgImage(SerializationInfo info, StreamingContext context)
Parameters
System.Runtime.Serialization.SerializationInfo
info
|
System.Runtime.Serialization.StreamingContext
context
|
Properties
AllowCache
Declaration
public static bool AllowCache { get; set; }
Property Value
System.Boolean
|
Document
Height
Gets or sets the default height of the SVG image. Note that if you set negative value or null, the default height of the SvgDocument will be returned when accessing the property.
Declaration
public int Height { get; set; }
Property Value
System.Int32
|
Size
Gets or sets the default size of the SVG image. If this property is not modified it takes the value from the SvgDocument.
Declaration
public Size Size { get; set; }
Property Value
System.Drawing.Size
|
Width
Gets or sets the default width of the SVG image. Note that if you set negative value or null, the default width of the SvgDocument will be returned when accessing the property.
Declaration
public int Width { get; set; }
Property Value
System.Int32
|
Methods
ClearCache()
Clears all cached raster images.
Declaration
public virtual void ClearCache()
Clone()
Declaration
public object Clone()
Returns
System.Object
|
Implements
Deserialize(String)
Declaration
public static RadSvgImage Deserialize(string encodedImage)
Parameters
System.String
encodedImage
|
Returns
RadSvgImage
|
Dispose()
Declaration
public void Dispose()
Implements
FromByteArray(Byte[])
Creates a RadSvgImage from the specified byte array.
Declaration
public static RadSvgImage FromByteArray(byte[] bytes)
Parameters
System.Byte[]
bytes
A byte array that contains the data for this RadSvgImage. |
Returns
RadSvgImage
The RadSvgImage this method creates. |
FromFile(String)
Creates a RadSvgImage from the specified file.
Declaration
public static RadSvgImage FromFile(string filename)
Parameters
System.String
filename
A string that contains the name of the file from which to create the RadSvgImage. |
Returns
RadSvgImage
The RadSvgImage this method creates. |
FromStream(Stream)
Creates a RadSvgImage from the specified data stream.
Declaration
public static RadSvgImage FromStream(Stream stream)
Parameters
System.IO.Stream
stream
A System.IO.Stream that contains the data for this RadSvgImage. |
Returns
RadSvgImage
The RadSvgImage this method creates. |
FromXml(String)
Creates a RadSvgImage from the specified XML string.
Declaration
public static RadSvgImage FromXml(string xml)
Parameters
System.String
xml
|
Returns
RadSvgImage
|
GetRasterImage(Boolean)
Returns a raster System.Drawing.Bitmap with the default width and height for the loaded SVG document.
Declaration
public virtual Bitmap GetRasterImage(bool cache = true)
Parameters
System.Boolean
cache
Determines whether to cache the raster image. Default value is true. |
Returns
System.Drawing.Bitmap
The raster image. |
GetRasterImage(Size, Boolean)
Returns a raster System.Drawing.Bitmap by given size for the loaded SVG document.
Declaration
public virtual Bitmap GetRasterImage(Size size, bool cache = true)
Parameters
System.Drawing.Size
size
The size of the SVG document. |
System.Boolean
cache
Determines whether to cache the raster image. Default value is true. |
Returns
System.Drawing.Bitmap
The raster image. |
GetRasterImage(Int32, Int32, Boolean)
Returns a raster System.Drawing.Bitmap by given width and height for the loaded SVG document.
Declaration
public virtual Bitmap GetRasterImage(int width, int height, bool cache = true)
Parameters
System.Int32
width
The width of the raster image. |
System.Int32
height
The height of the raster image. |
System.Boolean
cache
Determines whether to cache the raster image. Default value is true. |
Returns
System.Drawing.Bitmap
The raster image. |
Serialize(RadSvgImage)
Declaration
public static string Serialize(RadSvgImage svgImage)
Parameters
RadSvgImage
svgImage
|
Returns
System.String
|
ShouldSerializeDocument()
Declaration
public bool ShouldSerializeDocument()
Returns
System.Boolean
|
ToString()
Declaration
public override string ToString()
Returns
System.String
|
Overrides
Explicit Interface Implementations
ISerializable.GetObjectData(SerializationInfo, StreamingContext)
Declaration
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
System.Runtime.Serialization.SerializationInfo
info
|
System.Runtime.Serialization.StreamingContext
context
|