Windows apps
Collapse the table of content
Expand the table of content
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.

ID2D1DeviceContext::GetEffectInvalidRectangles method

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


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


effect [in]

Type: ID2D1Effect*

The effect to get the invalid rectangles from.


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.

rectanglesCount [in]

Type: UINT32

The number of rectangles to get.

Return value


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

S_OKNo error occurred.
E_OUTOFMEMORYDirect2D could not allocate sufficient memory to complete the call.
E_INVALIDARGAn invalid parameter was passed to the returning function.



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.


Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]

Minimum supported phone

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





See also




© 2017 Microsoft