Working with Coordinate System Transformations

Global Transformation

For global transformation of a scene in C#, the following steps can be used.

  1. Instantiate a new object of Bitmap class
  2. Initialize a new object of Graphics class with this bitmap object
  3. Use the RotateTransform method of Graphics object to specify the rotation angle
  4. Draw the shapes with global transformation

Global Transformation

Local Transformation

For local transformation of an object in C#, the following steps can be used.

  1. Instantiate a new object of Bitmap class
  2. Initialize a new object of Graphics class with this bitmap object
  3. Create a shape such as Ellipse
  4. Define a matrix with desired transformation
  5. Apply the matrix to defined object

Local Transformation

Matrix Transformation

For Matrix transformation of a path in C#, the following steps can be used.

  1. Instantiate a new object of Bitmap class
  2. Initialize a new object of Graphics class with this bitmap object
  3. Create a shape such as Rectangle
  4. Define the Matrix Transformation using the Matrix class
  5. Apply the transformation to defined rectangle

Matrix Transformation

Page Transformation

For Page transformation of a scene in C#, the following steps can be used.

  1. Instantiate a new object of Bitmap class
  2. Initialize a new object of Graphics class with this bitmap object
  3. Set the GraphicsUnit for the Graphics class object
  4. Draw a shape such as Rectangle

Page Transformation

Units of Measure

To apply different units of measurement to different objects of a scene in C#, the following steps can be used.

  1. Instantiate a new object of Bitmap class
  2. Initialize a new object of Graphics class with this bitmap object
  3. Set the PageUnit for the Graphics class object
  4. Draw the shapes such as Rectangles

Units of Measure

World Transformation

For World Transformation, the following sample C# code can be used.

  1. Instantiate a new object of Bitmap class
  2. Initialize a new object of Graphics class with this bitmap object
  3. Use the TranslateTransform method to set the transformation
  4. Draw a shape such as Rectangle

World Transformation