ID2D1DeviceContext::GetEffectInvalidRectangles method (d2d1_1.h)

Gets the invalid rectangles that have accumulated since the last time the effect was drawn and EndDraw was then called on the device context.

Syntax

HRESULT GetEffectInvalidRectangles(
  [in]  ID2D1Effect *effect,
  [out] D2D1_RECT_F *rectangles,
  [in]  UINT32      rectanglesCount
);

Parameters

[in] effect

Type: ID2D1Effect*

The effect to get the invalid rectangles from.

[out] rectangles

Type: D2D1_RECT_F*

An array of D2D1_RECT_F structures. You must allocate this to the correct size. You can get the count of the invalid rectangles using the GetEffectInvalidRectangleCount method.

[in] rectanglesCount

Type: UINT32

The number of rectangles to get.

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

Note  Direct2D does not automatically use these invalid rectangles to reduce the region of an effect that is rendered.
 

You can use the InvalidateEffectInputRectangle method to specify invalidated rectangles for Direct2D to propagate through an effect graph.

If multiple invalid rectangles are requested, the rectangles that this method returns may overlap. When this is the case, the rectangle count might be lower than the count that GetEffectInvalidRectangleCount.

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 d2d1_1.h
DLL D2d1.dll

See also

ID2D1DeviceContext