Compartilhar via


Matrix.AffineTransformation2D Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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
)
static member AffineTransformation2D : 
        scaling:float32 * 
        rotationCenter:Vector2 * 
        rotation:float32 * 
        translation:Vector2 -> Matrix 

Parameters

  • scaling
    Type: System.Single
    Scaling factor. A value of zero indicates no scaling.
  • rotation
    Type: System.Single
    Angle of rotation. A value of zero indicates no rotation.

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

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

See Also

Reference

Matrix Structure

Matrix Members

Microsoft.WindowsMobile.DirectX Namespace