Skip to main content

Terminology

This page will introduce some commonly used terms in carefree-drawboard 🎨.

Node

Every object on the drawboard is a Node. Typical Nodes are:

  • ImageNode, which represents an image.
  • TextNode, which represents a piece of text.
  • PathNode, which represents the path you draw (with the help of the Brush plugin) on the drawboard 🎨.
  • Group, which represents a group of Node.

SingleNode

In the context of carefree-drawboard 🎨, a SingleNode represents one single Node which is not a Group. Which means:

  • Multiple Nodes is NOT SingleNode.
  • ImageNode is SingleNode.
  • TextNode is SingleNode.
  • Group is NOT SingleNode.

Pivot

Pivot is an important concept when we need to position our plugins. All supported Pivots are:

  • lt: left top corner.
  • top: top center.
  • rt: right top corner.
  • left: middle left.
  • center: middle center.
  • right: middle right.
  • lb: left bottom corner.
  • bottom: bottom center.
  • rb: right bottom corner.

Styles

'Styles' in carefree-drawboard 🎨 often refers to IPluginSettings, which is returned by the settings property of every plugin.

Logics

'Logics' in carefree-drawboard 🎨 often refers to what is happened inside the process method of every plugin.

Binding

'Bindings' in carefree-drawboard 🎨 often refers to Built-in Plugin Bindings.

info

See Built-in Bindings for more details.

Injections

In order to trace the 'history' of your creations, carefree-drawboard 🎨 will maintain an injections field in meta of each Node. Generally speaking, every Node should be created by two aspects:

  • What kind of plugin was used.
  • What parameters did that plugin use.

The first aspect is stored in the identifier property, and is relatively 'standalone'. The second aspect is where the 'tracing' happens:

  • If this Node is created 'out of nowhere' (e.g., no tracing), then parameters are all given by the user. In this case, the injections field will be empty.
  • Otherwise, some of the parameters will be derived from other Node(s). In this case, the injections field should record:
    • Which property is derived?
    • What the Node information is that provides the value?

Currently, carefree-drawboard 🎨 will maintain injections automatically only when:

And for other situations, we leave it to you to maintain the injections field, if you want to stay 'traced'.

info

We provide a built-in method: set_injection for you to add injections handily.