Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ID2D1RenderTarget::SetTransform method

Applies the specified transform to the render target, replacing the existing transformation. All subsequent drawing operations occur in the transformed space.

Syntax


void SetTransform(
  const D2D1_MATRIX_3X2_F &transform
);

Parameters

transform [ref]

Type: const D2D1_MATRIX_3X2_F

The transform to apply to the render target.

Return value

This method does not return a value.

Examples

The following example uses the SetTransform method to apply a rotation to the render target. For the complete example, see How to Rotate an Object.


// Apply the rotation transform to the render target.
m_pRenderTarget->SetTransform(
    D2D1::Matrix3x2F::Rotation(
        45.0f,
        D2D1::Point2F(468.0f, 331.5f))
    );


For additional examples showing how to transform a render target, see How to Scale an Object, How to Skew an Object, and How to Translate an Object.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1.h

Library

D2d1.lib

DLL

D2d1.dll

See also

ID2D1RenderTarget
Transforms Overview
How to Rotate an Object
How to Scale an Object
How to Skew an Object
How to Translate an Object
How to Apply Multiple Transforms to an Object

 

 

Community Additions

Show:
© 2014 Microsoft