ID2D1EffectContext::CreateOffsetTransform method (d2d1effectauthor.h)

Creates and returns an offset transform.

Syntax

HRESULT CreateOffsetTransform(
        D2D1_POINT_2L        offset,
  [out] ID2D1OffsetTransform **transform
);

Parameters

offset

Type: D2D1_POINT_2L

The offset amount.

[out] transform

Type: ID2D1OffsetTransform**

When this method returns, contains the address of a pointer to an offset transform object.

Return value

Type: HRESULT

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

HRESULT Description
S_OK No error occurred.
E_OUTOFMEMORY Direct2D could not allocate sufficient memory to complete the call.
E_INVALIDARG An invalid parameter was passed to the returning function.

Remarks

An offset transform is used to offset an input bitmap without having to insert a rendering pass. An offset transform is automatically inserted by an Affine transform if the transform evaluates to a pixel-aligned transform.

Requirements

Requirement Value
Minimum supported client Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header d2d1effectauthor.h
Library D2D1.lib

See also

ID2D1DeviceContext

ID2D1EffectContext