This documentation is archived and is not being maintained.

Graphics.Transform Property

Gets or sets a copy of the geometric world transformation for this Graphics.

Namespace:  System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

public Matrix Transform { get; set; }

Property Value

Type: System.Drawing.Drawing2D.Matrix
A copy of the Matrix that represents the geometric world transformation for this Graphics.

GDI+ uses three coordinate spaces: world, page, and device. World coordinates are the coordinates used to model a particular graphic world and are the coordinates you pass to methods in the .NET Framework. Page coordinates refer to the coordinate system used by a drawing surface, such as a form or a control. Device coordinates are the coordinates used by the physical device being drawn on, such as a screen or a printer. The Transform property represents the world transformation, which maps world coordinates to page coordinates.

Because the matrix returned and by the Transform property is a copy of the geometric transform, you should dispose of the matrix when you no longer need it.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.