Task: Pass tests.BoundsConstant
.
A first, very crude approximation of the bounding box, would be to return the entire drawing canvas. This is certainly very fast to calculate (it is a constant value), although it might mean excessive redrawing.
Implement an aspect to return the entire canves when the getBounds()
method of a Group
is invoked. The entire canvas can be retrieved through the static field MAX_BOUNDS
of FigureElement
.
getBounds()
method entirely with around
advice intercepting the method.
This should make the test cases of tests.BoundsConstant
pass.
When done, remove the aspect from your build path. Continue with Exercise 2.