It is not clear whether the getBounds() methods of drawable objects return absolute coordinates, or relative coordinates respective so some point (e.g., the centroid). The latter is used by dsol; the former is what you would intuitively expect. The comments state: "Retrieve the bounding rectangle of the object", which does not make it any more clear.
Research different options:
split getBounds() into getRelativeBounds() and getAbsoluteBounds()
just improve documentation
see what to do when an object is translated or rotated on the screen -- what are its bounds?
No matter what we choose, the method's javadoc HAS to be made more clear.
It is not clear whether the
getBounds()
methods of drawable objects return absolute coordinates, or relative coordinates respective so some point (e.g., the centroid). The latter is used by dsol; the former is what you would intuitively expect. The comments state: "Retrieve the bounding rectangle of the object", which does not make it any more clear.Research different options:
getBounds()
intogetRelativeBounds()
andgetAbsoluteBounds()
No matter what we choose, the method's javadoc HAS to be made more clear.