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
IXRCompositeTransform
Methods
Method |
Description |
---|---|
Retrieves the x-coordinate of the center point for all transforms specified in this composite transform. |
|
Retrieves the y-coordinate of the center point for all transforms specified in this composite transform. |
|
Retrieves the angle, in degrees, of clockwise rotation applied to an object. |
|
Retrieves the x-axis scale factor, which determines the horizontal stretching or shrinking of an object. |
|
Retrieves the y-axis scale factor, which determines the vertical stretching or shrinking of an object. |
|
Retrieves the x-axis skew angle, which is measured in degrees counterclockwise from the y-axis. |
|
Retrieves the y-axis skew angle, which is measured in degrees counterclockwise from the x-axis. |
|
Retrieves the distance the object is translated (moved) along the x-axis. |
|
Retrieves the distance an object is translated (moved) along the y-axis. |
|
Sets the x-coordinate of the center point for all transforms specified in this composite transform. |
|
Sets the y-coordinate of the center point for all transforms specified in this composite transform. |
|
Sets the angle, in degrees, of clockwise rotation to apply to an object. |
|
Sets the x-axis scale factor, which you can use to stretch or shrink an object horizontally. |
|
Sets the y-axis scale factor, which you can use to stretch or shrink an object vertically. |
|
Sets the x-axis skew angle, which is measured in degrees counterclockwise from the y-axis. |
|
Sets the y-axis skew angle, which is measured in degrees counterclockwise from the x-axis. |
|
Sets the distance to translate (move) an object along the x-axis. |
|
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.
- Scale
- Skew
- Rotate
- 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 |