IXRSkewTransform (Compact 2013)
3/28/2014
This class represents a two-dimensional skew applied to an object.
Syntax
class IXRSkewTransform : public IXRTransform
Inheritance Hierarchy
IXRSkewTransform
Methods
Method |
Description |
---|---|
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 x-coordinate of the transform center. |
|
Retrieves the y-coordinate of the transform center. |
|
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 x-coordinate of the transform center. |
|
Sets the y-coordinate of the transform center. |
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
A skew transformation is useful for creating the illusion of three-dimensional depth in a two-dimensional object.
Skewing (or shearing) an object is a transformation that distorts an object by a specified angle from an axis. You can also alter the location of the center of that object, in relation to its origin point.
You can offset the local origin point (0,0) for a UI element can be offset on an IXRCanvas container object by setting the attached properties Canvas.Left and Canvas.Top. However, this is not considered a transformation; the UI object keeps its own local origin point for transformation purposes.
You can apply a group of multiple transformations, which can also include an IXRSkewTransform, to a UI object by using an IXRTransformGroup object. You can create custom transformations by using IXRMatrixTransform.
Note
A font can simulate an italic style by shearing, or skewing a glyph. However, a true italic font generally looks better than a simulated italic font. For more information about glyphs in XAML for Windows Embedded, see IXRGlyphs.
To apply a skew transformation to a UI object, create an IXRSkewTransform instance and specify the desired offset values in SetAngleX, SetAngleY, SetCenterX, and SetCenterY. Then, apply the transformation to the object by passing it into the inherited method IXRUIElement::SetRenderTransform.
Three skew transformations of a rectangle are shown below.
The first illustration shows a skewing of the rectangle at AngleX: 45°, AngleY: 0°, and Center: (0,0).
The second illustration shows skewing of the rectangle at AngleX: 45°, AngleY: 0°, and Center: (25, 25).
The third illustration shows skewing at AngleX: 0°, AngleY: 45°, and Center: (25, 25).
When you create a class instance, use an IXRSkewTransformPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.
You can also define a skew transformation 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 SkewTransform Class on MSDN.
.NET Framework Equivalent
System.Windows.Media.SkewTransform
Requirements
Header |
XamlRuntime.h |
sysgen |
SYSGEN_XAML_RUNTIME |