Graphics.TransformPoints Method (CoordinateSpace, CoordinateSpace, PointF[])
Assembly: System.Drawing (in system.drawing.dll)
public: void TransformPoints ( CoordinateSpace destSpace, CoordinateSpace srcSpace, array<PointF>^ pts )
public void TransformPoints ( CoordinateSpace destSpace, CoordinateSpace srcSpace, PointF[] pts )
public function TransformPoints ( destSpace : CoordinateSpace, srcSpace : CoordinateSpace, pts : PointF[] )
Not applicable.
Parameters
- destSpace
Member of the CoordinateSpace enumeration that specifies the destination coordinate space.
- srcSpace
Member of the CoordinateSpace enumeration that specifies the source coordinate space.
- pts
Array of PointF structures that represent the points to transform.
The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. The code performs the following actions:
-
Creates two points and draws a blue line between them.
-
Sets the world transform to translate by amounts 40 in the x direction and 30 in the y direction.
-
Transforms the points from world coordinates (World) to page coordinates (Page).
-
Resets the world transformation to the identity and draws a red line between the transformed points.
The result is a blue line and a translated red line below it.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.