# 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:

  ```jsx
  var path = new Path.Star(new Point(0, 0), 6, 5, 13);
  path.style = {
      fillColor: 'white',
      strokeColor: 'black'
  };

  // Create a symbol definition from the path:
  var definition = new SymbolDefinition(path);

  // Place 100 instances of the symbol definition:
  for (var i = 0; i < 100; i++) {
      // Place an instance of the symbol definition in the project:
      var instance = definition.place();

      // Move the instance to a random position within the view:
      instance.position = Point.random() * view.size;

      // Rotate the instance by a random amount between
      // 0 and 360 degrees:
      instance.rotate(Math.random() * 360);

      // Scale the instance between 0.25 and 1:
      instance.scale(0.25 + Math.random() * 0.75);
  }
  ```

## 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 — optional
  * Returns:
  * `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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://paperjs.typogram.co/symbols/symboldefinition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
