次の方法で共有


IXRMatrix (Compact 2013)

3/28/2014

This class represents a two-dimensional plane that has four flexible quadrants.

Syntax

class IXRMatrix : public IXRDependencyObject

Inheritance Hierarchy

IXRDependencyObject

    IXRMatrix

Methods

Method

Description

IXRMatrix::GetM11

Retrieves the multiplier value that is applied to the points in the first row and first column of this matrix.

IXRMatrix::GetM12

Retrieves the multiplier value that is applied to the points in the first row and second column of this matrix.

IXRMatrix::GetM21

Retrieves the multiplier value that is applied to the points in the second row and first column of this matrix.

IXRMatrix::GetM22

Retrieves the multiplier value that is applied to the points in the second row and second column of this matrix.

IXRMatrix::GetOffsetX

Retrieves the amount by which this matrix is moved along the x-axis, offset from the upper-left coordinate.

IXRMatrix::GetOffsetY

Retrieves the amount by which this matrix is moved down the y-axis, offset from the upper-left coordinate.

IXRMatrix::IsIdentity

Retrieves a value that indicates whether this matrix is an identity matrix.

IXRMatrix::SetM11

Sets the multiplier value to apply to the points in the first row and first column of this matrix.

IXRMatrix::SetM12

Sets the multiplier value to apply to the points in the first row and second column of this matrix.

IXRMatrix::SetM21

Sets the multiplier value to apply to the points in the second row and first column of this matrix.

IXRMatrix::SetM22

Sets the multiplier value to apply to the points in the second row and second column of this matrix.

IXRMatrix::SetOffsetX

Sets the amount by which to move this matrix along the x-axis, offset from the upper-left coordinate.

IXRMatrix::SetOffsetY

Sets the amount by which to move this matrix down the y-axis, offset from the upper-left coordinate.

IXRMatrix::Transform

Transforms the specified source x,y coordinate by using the math defined in this matrix and returns the target x,y coordinate.

Thread Safety

Members of this class are thread-safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.

Remarks

You can use the IXRMatrix object to define a custom transformation that you can apply to a UI object. IXRMatrix lets you combine the effects available in IXRScaleTransform, IXRSkewTransform, IXRTranslateTransform, and IXRRotateTransform. You can also control the intensity of each effect by using multiplier values. You can create a unique transformation for an object by using different multiplier values for M11, M12, M21, and M22. Then, you can set this IXRMatrix instance as the value of an IXRMatrixTransform, which is in turn set for a particular UI object.

You can create a custom IXRMatrix object that defines a matrix transformation, and supply it in a call to IXRMatrixTransform::SetMatrix.

As an alternative to performing custom matrix mathematics by using IXRMatrix, you can combine transformations by creating an IXRTransformGroup object and apply multiple transformations to a UI object.

When you create a class instance, use an IXRMatrixPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

You can also define a matrix as an attribute in Microsoft Silverlight 3 XAML. For information about the differences between XAML in XAML for Windows Embedded and Silverlight 3, see Differences Between Microsoft Silverlight 3 and XAML for Windows Embedded. For more information about how to define this element in the source XAML for your application, see the Matrix Structure on MSDN.

.NET Framework Equivalent

System.Windows.Media.Matrix

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Visual Appearance
IXRMatrixTransform