Partager via


IXRRotateTransform::SetCenterX (Windows Embedded CE 6.0)

1/6/2010

This method sets the x-coordinate of the rotation center point.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetCenterX(
    float CenterX
) = 0;

Parameters

  • CenterX
    [in] A value that indicates the x-coordinate of the center of rotation.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

When you use an IXRRotateTransform object, the transformation rotates the coordinate system for a particular object around the point (0,0). The object itself is not necessarily rotated around its center. For example, if an object is positioned 200 units from the x-axis, a rotation of 30 degrees will swing the object 30 degrees along a circle that has a radius of 200 centered at the origin. To rotate an object in place, pass the x-coordinate and y-coordinate of the center of the object in IXRRotateTransform::SetCenterX and IXRRotateTransform::SetCenterY.

The local origin point for an object can be offset on an IXRCanvas container object by setting the Canvas.Left and Canvas.Top attached properties through IXRDependencyObject::SetAttachedProperty. However, this does not count as a transform. The object keeps its own local origin point for transformation purposes.

.NET Framework Equivalent

System.Windows.Media.RotateTransform.CenterX

Requirements

sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

IXRRotateTransform
IXRRotateTransform::GetCenterX