SymbolDefinition
Symbols allow you to place multiple instances of an item in your project. This can save memory, since all instances of a symbol simply refer to the original item and it can speed up moving around complex objects, since internal properties such as segment lists and gradient positions don’t need to be updated with every transformation.
Constructors
SymbolDefinition(item[, dontCenter])
Creates a Symbol definition.
Parameters:
item:
Item
— the source item which is removed from the scene graph and becomes the symbol’s definition.dontCenter:
Boolean
— optional, default:false
Returns:
SymbolDefinition
Example:Placing 100 instances of a symbol:
Properties
project
The project that this symbol belongs to.
Read only.
Type:
Project
item
The item used as the symbol’s definition.
Type:
Item
Methods
place([position])
Places in instance of the symbol in the project.
Parameters:
position:
Point
— the position of the placed symbol — optionalReturns:
SymbolItem
clone()
Returns a copy of the symbol.
Returns:
SymbolDefinition
equals(symbol)
Checks whether the symbol’s definition is equal to the supplied symbol.
Parameters:
symbol:
SymbolDefinition
Returns:
Boolean
—true
if they are equal,false
otherwise