ID2D1RenderTarget::SetTransform methods

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

Overload list

Method Description
SetTransform(D2D1_MATRIX_3X2_F&) Applies the specified transform to the render target, replacing the existing transformation. All subsequent drawing operations occur in the transformed space.
SetTransform(D2D1_MATRIX_3X2_F*) Applies the specified transform to the render target, replacing the existing transformation. All subsequent drawing operations occur in the transformed space.

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

Requirement Value
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