Skip to content

Instantly share code, notes, and snippets.

@johnmay
Created November 11, 2012 17:16
Show Gist options
  • Select an option

  • Save johnmay/4055569 to your computer and use it in GitHub Desktop.

Select an option

Save johnmay/4055569 to your computer and use it in GitHub Desktop.
Wide labels
// 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