Compartir a través de


IXRRotateTransform::SetCenterX (Compact 2013)

3/28/2014

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

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRRotateTransform
IXRRotateTransform::GetCenterX