Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address possible confusion about getBounds() in djutils-draw #22

Open
averbraeck opened this issue Sep 10, 2023 · 0 comments
Open

Address possible confusion about getBounds() in djutils-draw #22

averbraeck opened this issue Sep 10, 2023 · 0 comments
Assignees
Labels
djutils-draw djutils-draw project documentation Improvements or additions to documentation simplification simplification of code

Comments

@averbraeck
Copy link
Owner

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.

@averbraeck averbraeck added documentation Improvements or additions to documentation djutils-draw djutils-draw project simplification simplification of code labels Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
djutils-draw djutils-draw project documentation Improvements or additions to documentation simplification simplification of code
Projects
None yet
Development

No branches or pull requests

3 participants