Add "Empty" method to Hierarchy

This commit is contained in:
Sasha Koshka 2024-06-02 22:47:34 -04:00
parent 641514c6d1
commit 8d3a708bca

View File

@ -73,6 +73,11 @@ func (this *Hierarchy) SetRoot (root tomo.Box) {
this.minimumClean = false
}
// Empty returns whether or not the root of the Hierarchy is nil.
func (this *Hierarchy) Empty () bool {
return this.root == nil
}
// SetCanvas sets the held canvas of the Hierarchy that all boxes within it will
// draw to. The Hierarchy will use the canvas.Canvas's bounds to lay itself out.
func (this *Hierarchy) SetCanvas (can canvas.Canvas) {