IDXARGBReadPtr::UnpackRect Method

This topic documents a feature of Visual Filters and Transitions, which is deprecated as of Windows Internet Explorer 9 and obsolete as of Internet Explorer 10.

Unpacks a subsection of source samples defined by a rectangle structure and advances the horizontal position of the read pointer. Use to unpack multiple rows.


void UnpackRect(
    const DXPACKEDRECTDESC *pRectDesc


[in] Pointer to a DXPACKEDRECTDESC structure to use in unpacking the rectangular region of samples.

Return Value

No return value.


This method can be used to unpack single columns or rectangular regions of a surface into contiguous samples. It also can unpack columns or regions row-by-row into equally spaced, noncontiguous regions if you set the lRowPadding member of DXPACKEDRECTDESC to a nonzero value.

The size of the buffer required is ((Width + lRowPadding) * (Height - 1)) + Width. If lRowPadding is zero, this is equivalent to Width*Height.

The IDXARGBReadPtr::UnpackRect method starts with the sample at the upper-left corner of the rectangle and unpacks samples into the buffer until it reaches the end of the row. The method then adds lRowPadding samples to the buffer pointer and unpacks the next row.

After this call has been made, the current position of the pointer object is undefined. You must call IDXARGBReadPtr::MoveToRow, IDXARGBReadPtr::MoveAndGetRunInfo, or IDXARGBReadPtr::MoveToXY to re-establish the pointer location before calling IDXARGBReadPtr::Unpack or IDXARGBReadPtr::UnpackPremult.

Community Additions

© 2015 Microsoft