Skip to content

Instantly share code, notes, and snippets.

@libliboom
Created October 31, 2019 18:42
Show Gist options
  • Save libliboom/b76ff485bf601529da4ccb53d93fc349 to your computer and use it in GitHub Desktop.
Save libliboom/b76ff485bf601529da4ccb53d93fc349 to your computer and use it in GitHub Desktop.
// before
setOuterBounds(x, y, width, height);
setInnerBounds(x + 2, y + 2, width - 4, height - 4);
// after
setOuterBounds(bounds);
setInnerBounds(bounds.expand(-2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment