Working with Coordinate System Transformations
Contents
[
Hide
]
Global Transformation
For global transformation of a scene in C#, the following steps can be used.
- Instantiate a new object of Bitmap class
- Initialize a new object of Graphics class with this bitmap object
- Use the RotateTransform method of Graphics object to specify the rotation angle
- Draw the shapes with global transformation
Local Transformation
For local transformation of an object in C#, the following steps can be used.
- Instantiate a new object of Bitmap class
- Initialize a new object of Graphics class with this bitmap object
- Create a shape such as Ellipse
- Define a matrix with desired transformation
- Apply the matrix to defined object
Matrix Transformation
For Matrix transformation of a path in C#, the following steps can be used.
- Instantiate a new object of Bitmap class
- Initialize a new object of Graphics class with this bitmap object
- Create a shape such as Rectangle
- Define the Matrix Transformation using the Matrix class
- Apply the transformation to defined rectangle
Page Transformation
For Page transformation of a scene in C#, the following steps can be used.
- Instantiate a new object of Bitmap class
- Initialize a new object of Graphics class with this bitmap object
- Set the GraphicsUnit for the Graphics class object
- Draw a shape such as Rectangle
Units of Measure
To apply different units of measurement to different objects of a scene in C#, the following steps can be used.
- Instantiate a new object of Bitmap class
- Initialize a new object of Graphics class with this bitmap object
- Set the PageUnit for the Graphics class object
- Draw the shapes such as Rectangles
World Transformation
For World Transformation, the following sample C# code can be used.
- Instantiate a new object of Bitmap class
- Initialize a new object of Graphics class with this bitmap object
- Use the TranslateTransform method to set the transformation
- Draw a shape such as Rectangle