IXRSkewTransform (Compact 2013)

3/28/2014

This class represents a two-dimensional skew applied to an object.

Syntax

class IXRSkewTransform : public IXRTransform

Inheritance Hierarchy

IXRDependencyObject

    IXRGeneralTransform

        IXRTransform

            IXRSkewTransform

Methods

Method

Description

IXRSkewTransform::GetAngleX

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

IXRSkewTransform::GetAngleY

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

IXRSkewTransform::GetCenterX

Retrieves the x-coordinate of the transform center.

IXRSkewTransform::GetCenterY

Retrieves the y-coordinate of the transform center.

IXRSkewTransform::SetAngleX

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

IXRSkewTransform::SetAngleY

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

IXRSkewTransform::SetCenterX

Sets the x-coordinate of the transform center.

IXRSkewTransform::SetCenterY

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).

Ee502751.24b69a31-454e-4373-8615-49d9a779b2e1(en-us,WinEmbedded.80).jpg

The second illustration shows skewing of the rectangle at AngleX: 45°, AngleY: 0°, and Center: (25, 25).

Ee502751.5a738b6a-79dd-4a0d-be7f-328cdbfe5a6c(en-us,WinEmbedded.80).jpg

The third illustration shows skewing at AngleX: 0°, AngleY: 45°, and Center: (25, 25).

Ee502751.5ff8d79a-25c5-4d84-9aca-732f149df7a2(en-us,WinEmbedded.80).jpg

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

See Also

Reference

Classes for Visual Appearance