Share via


IXRMatrixTransform (Windows Embedded CE 6.0)

1/6/2010

This class creates an affine matrix transformation that is used to manipulate UI objects or coordinate systems in a two-dimensional plane.

Syntax

class IXRMatrixTransform : public IXRTransform

Methods

Method Description

IXRMatrixTransform::GetMatrix

Retrieves the matrix that defines this transformation.

IXRMatrixTransform::SetMatrix

Sets the matrix that defines this transformation.

Remarks

You can use an IXRMatrixTransform object to create custom transformations that are not provided by the IXRRotateTransform, IXRScaleTransform, IXRSkewTransform, and IXRTranslateTransform classes.

A two-dimensional x-y plane uses a cubic (3 × 3) matrix for transformations. You can form linear transformations, such as rotation and skew (shear) transformations, by multiplying affine matrix transformations followed by positioning translation.

The final column of an affine matrix transformation is equal to (0, 0, 1). Therefore, you have to define only the members in the first two columns, which equates to four 4 flexible quadrants, and set the x-y offset.

For more information about the custom transformation, see IXRMatrix.

You can offset the local (0,0) position for a UI object on an IXRCanvas container object by setting its attached properties Canvas.Left and Canvas.Top. However, this does not operate as a transform and the object still keeps its own local (0,0) position.

Multiple transformations can be applied to an object by using IXRTransformGroup. Depending on the matrix math you create, even multiple matrix transformations are possible.

To apply a matrix transformation to a UI object, create an IXRMatrixTransform instance and apply it to the object by passing it into the inherited method IXRUIElement::SetRenderTransform.

IXRMatrixTransform is for custom transformations. It is usually easier to use the specific transformations IXRRotateTransform, IXRScaleTransform, IXRSkewTransform, or IXRTranslateTransform.

You can also define a matrix transformation in Microsoft Silverlight 2 XAML. For information about the differences between XAML in Silverlight for Windows Embedded and Silverlight 2, see Differences Between Silverlight for the Web and Silverlight for Windows Embedded. For more information about how to define this element in the source XAML for your application, see this Microsoft Web site.

Inheritance Hierarchy

IXRDependencyObject

    IXRGeneralTransform

        IXRTransform

            IXRMatrixTransform

.NET Framework Equivalent

System.Windows.Media.MatrixTransform

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

Classes for Visual Appearance and Behavior

Other Resources