SvgImage
SvgImage class
Represents an SVG image.
SvgImage
Name | Description |
---|---|
SvgImage(byte[]) | Creates new SvgImage object. |
Parameters:
Name | Type | Description |
---|---|---|
data | byte[] | Svg data. |
Returns: SvgImage
SvgImage
Name | Description |
---|---|
SvgImage(String) | Creates new SvgImage object. |
Parameters:
Name | Type | Description |
---|---|---|
svgContent | String | Svg content. |
Returns: SvgImage
createSvgImageFromStream
Name | Description |
---|---|
createSvgImageFromStream (ReadStream, Function) | Creates new SvgImage object. |
Parameters:
Name | Type | Description |
---|---|---|
stream | ReadStream | Svg stream. |
callback | Function | callback(error, item) - Callback to be called when the class is created, item is the new instance of the SvgImage |
Returns: SvgImage
SvgImage
Name | Description |
---|---|
SvgImage(byte[], ExternalResourceResolver, String) | Creates new SvgImage object. |
Parameters:
Name | Type | Description |
---|---|---|
data | byte[] | Svg data. |
externalResResolver | ExternalResourceResolver | A callback object used to fetch external objects. If this parameter is null all external objects will be ignored. |
baseUri | String | Base URI of the specified Svg. Used to resolve relative links. |
Returns: SvgImage
SvgImage
Name | Description |
---|---|
SvgImage(byte[], HtmlExternalResolver, String) | Creates new SvgImage object. |
Parameters:
Name | Type | Description |
---|---|---|
data | byte[] | Svg data. |
externalResResolver | HtmlExternalResolver | A callback object used to fetch external objects. If this parameter is null all external objects will be ignored. |
baseUri | String | Base URI of the specified Svg. Used to resolve relative links. |
Returns: SvgImage
SvgImage
Name | Description |
---|---|
SvgImage(String, ExternalResourceResolver, String) | Creates new SvgImage object. |
Parameters:
Name | Type | Description |
---|---|---|
svgContent | String | Svg content. |
externalResResolver | ExternalResourceResolver | A callback object used to fetch external objects. If this parameter is null all external objects will be ignored. |
baseUri | String | Base URI of the specified Svg. Used to resolve relative links. |
Returns: SvgImage
SvgImage
Name | Description |
---|---|
SvgImage(String, HtmlExternalResolver, String) | Creates new SvgImage object. |
Parameters:
Name | Type | Description |
---|---|---|
svgContent | String | Svg content. |
externalResResolver | HtmlExternalResolver | A callback object used to fetch external objects. If this parameter is null all external objects will be ignored. |
baseUri | String | Base URI of the specified Svg. Used to resolve relative links. |
Returns: SvgImage
createSvgImageFromStream
Name | Description |
---|---|
createSvgImageFromStream (ReadStream, ExternalResourceResolver, String, Function) | Creates new SvgImage object. |
Parameters:
Name | Type | Description |
---|---|---|
stream | ReadStream | Svg stream. |
externalResResolver | ExternalResourceResolver | A callback object used to fetch external objects. If this parameter is null all external objects will be ignored. |
baseUri | String | Base URI of the specified Svg. Used to resolve relative links. |
callback | Function | callback(error, item) - Callback to be called when the class is created, item is the new instance of the SvgImage |
Returns: SvgImage
createSvgImageFromStream
Name | Description |
---|---|
createSvgImageFromStream (ReadStream, HtmlExternalResolver, String, Function) | Creates new SvgImage object. |
Parameters:
Name | Type | Description |
---|---|---|
stream | ReadStream | Svg stream. |
externalResResolver | HtmlExternalResolver | A callback object used to fetch external objects. If this parameter is null all external objects will be ignored. |
baseUri | String | Base URI of the specified Svg. Used to resolve relative links. |
callback | Function | callback(error, item) - Callback to be called when the class is created, item is the new instance of the SvgImage |
Returns: SvgImage
getBaseUri
Name | Description |
---|---|
getBaseUri () | Returns base URI of the specified Svg. Used to resolve relative links. Read-only String. |
Returns: String
getExternalResourceResolver
Name | Description |
---|---|
getExternalResourceResolver () | Return callback interface used to resolve external resources during Svg documents import. Read-only IExternalResourceResolver. |
Returns: ExternalResourceResolver, HtmlExternalResolver
getSvgContent
Name | Description |
---|---|
getSvgContent () | Returns SVG content. Read-only String. |
Returns: String
getSvgData
Name | Description |
---|---|
getSvgData () | Returns SVG data. Read-only byte[]. |
Returns: byte
writeAsEmfToStream
Name | Description |
---|---|
writeAsEmfToStream (SvgImage, WriteStream) | Saves the SVG image as an EMF file. |
Parameters:
Name | Type | Description |
---|---|---|
svgimage | SvgImage | link to self |
stream | WriteStream | Target stream |
Error
Error | Condition |
---|---|
ArgumentNullException | Target stream is null |