Working with Coordinate System Transformations
Contents
[
Hide
]
Global Transformation in Java
To globally transform a scene in Java, follow these steps:
- Create an instance of the
Bitmapclass. - Initialize a new object of the
Graphicsclass with this bitmap object. - Use the
rotateTransform()method of theGraphicsobject to specify the rotation angle. - Draw the shapes with global transformation.

Local Transformation of in Java
To locally transform an object in Java, follow these steps:
- Create an instance of the
Bitmapclass. - Initialize a new object of the
Graphicsclass with this bitmap object. - Create a shape such as
Ellipse. - Define a
Matrixobject with the desired transformation. - Apply the matrix to the defined object.

Matrix Transformation of a Path in Java
To perform a matrix transformation on a path in Java, follow these steps:
- Create an instance of the
Bitmapclass. - Initialize a new object of the
Graphicsclass with this bitmap object. - Create a shape such as a
Rectangle. - Define the Matrix Transformation using the
Matrixclass. - Apply the transformation to a defined rectangle.

Page Transformation in Java
To perform a page transformation of a scene in Java, follow these steps:
- Create an instance of the
Bitmapclass. - Initialize a new object of the
Graphicsclass with this bitmap object. - Set the
GraphicsUnitfor theGraphicsclass object. - Draw a shape such as a
Rectangle.

Applying Different Units of Measurement in Java
To apply different units of measurement to different objects in a scene in Java, follow these steps:
- Create an instance of the
Bitmapclass. - Initialize a new object of the
Graphicsclass with this bitmap object. - Set the
pageUnitproperties for theGraphicsclass object. - Draw shapes such as rectangles.

World Transformation in Java
To apply world transformation in Java, follow these steps:
- Create an instance of the
Bitmapclass. - Initialize a new object of the
Graphicsclass with this bitmap object. - Use the
translateTransform()method to set the transformation. - Draw a shape such as a rectangle.
