class

Sketchbook::Group

Inherits Sketchbook::Element < Reference < Object

Multiple Elements with a common origin (local coordinate system). Group can adopt and reject children dynamically.

Instance methods

adopt(element : Element)

Adds element as a child of this group.

WARNING: this method does not link up this and element's intakes. Do this yourself explicitly or via an override.

bring_to_front(element : Element)

Brings a child element in front of all others.

Does nothing if element is not a child of this group.

children

Returns the children of this group. The more right an element is, the greater its Z index is (it will appear on top of the elements before it). The last element is considered frontmost.

reject(element : Element)

Removes element from this group.

render(target)

Renders this element on the screen.

req

Returns the minimum required size of this group: the position of the corner of its rightmost & bottommost element.