Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rectangle r = path.getBounds();
- float x = button.getWidth() / 2 - r.width / 2 + x_offset;
- float y = button.getHeight() / 2 - r.height/ 2 + y_offset;
- Shape shape = ...
- AffineTransform at = AffineTransform.getTranslateInstance(dx, dy);
- Shape transformedShape = at.createTransformedShape(shape);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement