Matrix.AffineTransformation2D Method
Builds a 2-D affine transformation matrix in the xy plane.
Namespace: Microsoft.WindowsMobile.DirectX
Assembly: Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)
Syntax
'Declaration
Public Shared Function AffineTransformation2D ( _
scaling As Single, _
rotationCenter As Vector2, _
rotation As Single, _
translation As Vector2 _
) As Matrix
'Usage
Dim scaling As Single
Dim rotationCenter As Vector2
Dim rotation As Single
Dim translation As Vector2
Dim returnValue As Matrix
returnValue = Matrix.AffineTransformation2D(scaling, _
rotationCenter, rotation, translation)
public static Matrix AffineTransformation2D(
float scaling,
Vector2 rotationCenter,
float rotation,
Vector2 translation
)
public:
static Matrix AffineTransformation2D(
float scaling,
Vector2 rotationCenter,
float rotation,
Vector2 translation
)
public static function AffineTransformation2D(
scaling : float,
rotationCenter : Vector2,
rotation : float,
translation : Vector2
) : Matrix
Parameters
scaling
Type: System.SingleScaling factor. A value of zero indicates no scaling.
rotationCenter
Type: Microsoft.WindowsMobile.DirectX.Vector2A Vector2 structure that represents a point identifying the center of rotation. Use an empty Vector2 for no rotation.
rotation
Type: System.SingleAngle of rotation. A value of zero indicates no rotation.
translation
Type: Microsoft.WindowsMobile.DirectX.Vector2A Vector2 structure that represents the translation. Use Vector2.Empty to specify no translation.
Return Value
Type: Microsoft.WindowsMobile.DirectX.Matrix
A Matrix structure that is an affine transformation matrix.
Remarks
The AffineTransformation2D method calculates the affine transformation matrix using the following formula, with matrix concatenation evaluated in left-to-right order.
M out = M s * (M rc)-1 * M r * M rc * M t
where:
M out = output matrix (this instance)
M s = scaling matrix (scaling)
M rc = center of rotation matrix (rotationCenter)
M r = rotation matrix (rotation)
M t = translation matrix (translation)
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Platforms
Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Compact Framework
Supported in: 3.5, 2.0