|
How to apply various transformations such as translation, rotation on a shape |
|
|
This Java tip demonstrates a method of performing different operations such as Scaling, Shearing,
Translating, and Rotating a Shape. These operations may help developer to make new shapes suited
to applications.
AffineTransform transform = new AffineTransform();
transform.scale(scalex, scaley);
transform.shear(shiftx, shifty);
transform.translate(x, y);
transform.rotate(radians);
Shape newShape = transform.createTransformedShape(shape);
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.