Created
November 11, 2012 17:16
-
-
Save johnmay/4055569 to your computer and use it in GitHub Desktop.
Wide labels
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // check for wide labels | |
| boolean blunt = bounds.getWidth() / bounds.getHeight() > 3; | |
| // ... | |
| return new RoundRectangle2D.Double(x - (width/2), y - (height/2), | |
| width, height, | |
| blunt ? height : width, height); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment