VectorImage Interface

Log-in or register.

JScript VectorImage

VectorImage is an interface wrapper accessible as a property of the Document object and can be used to access and manipulate elements in a vector image.

Methods and properties

  • array ElementIDs - retrieve an array of element identifiers.
  • void DeleteElement(uint elementID) - removes element with the given ID from the vector image.
  • uint CreateElement(string toolID, string params) - create a new element and place it into the vector image. Element identifier is returned. The params parameter is optional. The toolID parameter is one of the drawing tools. Only selected drawing tools may be used in a vector image. The semantic of the params parameter depends on the selected tool.
  • void ModifyElement(uint elementID, string toolID, string params) - replace the element with the given ID with a different element.
  • string GetElementName(uint elementID)
  • void SetElementName(uint elementID, string name)
  • string GetElementStyleID(uint elementID) - retrieves fill style associated with given element.
  • string GetElementStyleParams(uint elementID)
  • void SetElementStyle(uint elementID, string name, string params)
  • void SetElementOutline(uint elementID, float width, uint rgba) - sets the width and color of element's outline. Set width to 0 to disable outline.
  • void ConvertToShape(uint elementID) - converts the element (ellipse, rectangle or polygon) with the given ID to a SHAPE.
  • void SetCanvas(uint sizeX, uint sizeY, float scaleX, float scaleY, float offsetX, float offsetY)
  • string GetElementToolID(uint elementID)
  • string GetElementToolParams(uint elementID)
  • uint CopyElement(object sourceImage, uint elementID) - adds a new element to the vector image and initializes it using the supplied element.
  • uint sizeX
  • uint sizeY
  • uint background
  • array GetIDsFromState(object context, string state)
  • void PutIDsToState(object context, string state, object selectedItems)

Recent comments

user icon Anonymous
What about ICL files?
I wish there were...