Compartilhar via


IXRCompositeTransform (Compact 2013)

3/28/2014

This C++ class represents a set of multiple transforms to apply to an object.

Syntax

class IXRCompositeTransform : public IXRTransform

Inheritance Hierarchy

IXRDependencyObject

    IXRGeneralTransform

        IXRTransform

            IXRCompositeTransform

Methods

Method

Description

IXRCompositeTransform::GetCenterX

Retrieves the x-coordinate of the center point for all transforms specified in this composite transform.

IXRCompositeTransform::GetCenterY

Retrieves the y-coordinate of the center point for all transforms specified in this composite transform.

IXRCompositeTransform::GetRotation

Retrieves the angle, in degrees, of clockwise rotation applied to an object.

IXRCompositeTransform::GetScaleX

Retrieves the x-axis scale factor, which determines the horizontal stretching or shrinking of an object.

IXRCompositeTransform::GetScaleY

Retrieves the y-axis scale factor, which determines the vertical stretching or shrinking of an object.

IXRCompositeTransform::GetSkewX

Retrieves the x-axis skew angle, which is measured in degrees counterclockwise from the y-axis.

IXRCompositeTransform::GetSkewY

Retrieves the y-axis skew angle, which is measured in degrees counterclockwise from the x-axis.

IXRCompositeTransform::GetTranslateX

Retrieves the distance the object is translated (moved) along the x-axis.

IXRCompositeTransform::GetTranslateY

Retrieves the distance an object is translated (moved) along the y-axis.

IXRCompositeTransform::SetCenterX

Sets the x-coordinate of the center point for all transforms specified in this composite transform.

IXRCompositeTransform::SetCenterY

Sets the y-coordinate of the center point for all transforms specified in this composite transform.

IXRCompositeTransform::SetRotation

Sets the angle, in degrees, of clockwise rotation to apply to an object.

IXRCompositeTransform::SetScaleX

Sets the x-axis scale factor, which you can use to stretch or shrink an object horizontally.

IXRCompositeTransform::SetScaleY

Sets the y-axis scale factor, which you can use to stretch or shrink an object vertically.

IXRCompositeTransform::SetSkewX

Sets the x-axis skew angle, which is measured in degrees counterclockwise from the y-axis.

IXRCompositeTransform::SetSkewY

Sets the y-axis skew angle, which is measured in degrees counterclockwise from the x-axis.

IXRCompositeTransform::SetTranslateX

Sets the distance to translate (move) an object along the x-axis.

IXRCompositeTransform::SetTranslateY

Sets the distance to translate (move) an object along the y-axis.

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

Instead of applying transforms to an object by using individual transform objects in an IXRTransformGroup (for example, IXRScaleTransform or IXRSkewTransform), you can use a single instance of the IXRCompositeTransform object to apply all these basic transforms. This enables you to make your XAML code more concise.

IXRCompositeTransform applies multiple transforms in the following recommended order.

  1. Scale
  2. Skew
  3. Rotate
  4. Translate

If, for whatever reason, you want to apply multiple transforms to an object in a different order than is recommended here, you can use the IXRTransformGroup class to do this. IXRTransformGroup is also useful if you want to specify different center points for the various transforms you apply. For example, the CenterX and CenterY properties of the IXRCompositeTransform are applied to all transforms in the IXRCompositeTransform. In contrast, you can specify different center points for IXRScaleTransform, IXRSkewTransform, and IXRRotateTransform within an IXRTransformGroup.

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

You can also create a composite transform 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 Composite Transform Class on MSDN.

.NET Framework Equivalent

System.Windows.Media.CompositeTransform

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Visual Appearance