Graphics.ScaleTransform Method (Single, Single, MatrixOrder)
Assembly: System.Drawing (in system.drawing.dll)
public void ScaleTransform ( float sx, float sy, MatrixOrder order )
public function ScaleTransform ( sx : float, sy : float, order : MatrixOrder )
Not applicable.
Parameters
- sx
Scale factor in the x direction.
- sy
Scale factor in the y direction.
- order
Member of the MatrixOrder enumeration that specifies whether the scaling operation is prepended or appended to the transformation matrix.
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:
-
Rotates the world transformation matrix of the Windows Form by 30 degrees.
-
Scales that matrix by a factor of 3 in the x direction and a factor of 1 in the y direction by appending the scaling transformation with the Append member.
-
Draws a rotated, scaled rectangle with a blue pen.
The result is a parallelogram.
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.