Class JSSVGImage
Jurassic class for exposing WMDataReader functionality to javascript called in a decision model.
Implements
Inherited Members
Namespace: Quantellia.WMServer.Execution.Model.JS
Assembly: WMServer.dll
Syntax
public class JSSVGImage : ObjectInstance, ISVGImage
Constructors
JSSVGImage(ObjectInstance)
Jurassic constructor.
Declaration
public JSSVGImage(ObjectInstance prototype)
Parameters
| Type | Name | Description |
|---|---|---|
| ObjectInstance | prototype |
Properties
Height
The height in pixels this SVG should be rasterized to. Can be set to zero to maintain aspect ratio if Width is non-zero.
Declaration
[JSProperty(Name = "height")]
public int Height { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
ImageData
Contains pairs of image names "someImage.png" to their base64 string representations. Any locations in the raw XML with "someImage.png" will be replaced with a temporary unique file saved on the local device, and deleted after the SVG is rasterized.
Declaration
public Dictionary<string, string> ImageData { get; set; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, string> |
MiscData
Arbitrary data.
Declaration
public Dictionary<string, object> MiscData { get; set; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, object> |
MiscData_ObjectInstance
DataType specific key-value pairs used to store arbitrary data. Saved as an ObjectInstance (JS bag of values object) for use in JS. Converted to Dictionary when returned in C#
Declaration
[JSProperty(Name = "MiscData")]
public ObjectInstance MiscData_ObjectInstance { get; set; }
Property Value
| Type | Description |
|---|---|
| ObjectInstance |
Width
The width in pixels this SVG should be rasterized to. Can be set to zero to maintain aspect ratio if Height is non-zero.
Declaration
[JSProperty(Name = "width")]
public int Width { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
XML
The raw XML of this SVG
Declaration
public string XML { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
AddImageRef(string, string)
Adds a reference to a virtual image path. (i.e. "path/to/image.png"). If the XML references the virtual path, a temporary local file will be created with the specified base 64 string, and the virtual path will be re-referenced to the local path.
Declaration
[JSFunction(Name = "addImageRef")]
public void AddImageRef(string imagePath, string imageBase64String)
Parameters
| Type | Name | Description |
|---|---|---|
| string | imagePath | The virtual path to the image |
| string | imageBase64String | The data of the image |
FromRawXML(string)
Populates the XML of this SVG image from a given string.
Declaration
[JSFunction(Name = "fromRawXML")]
public void FromRawXML(string XML)
Parameters
| Type | Name | Description |
|---|---|---|
| string | XML | XML string. |