Next / Previous / Contents

8.4. Canvas tags

A tag is a string that you can associate with objects on the canvas.

  • A tag can be associated with any number of objects on the canvas, including zero.

  • An object can have any number of tags associated with it, including zero.

Tags have many uses. For example, if you are drawing a map on a canvas, and there are text objects for the labels on rivers, you could attach the tag 'riverLabel' to all those text objects. This would allow you to perform operations on all the objects with that tag, such as changing their color or deleting them.