Accepts a buffer of either PMARGB32 or ARGB32 samples and writes them to a subsection of the output surface defined by a DXPACKEDRECTDESC structure.
void retVal = object.PackRect(pRectDesc);
Type: const DXPACKEDRECTDESC
Pointer to a DXPACKEDRECTDESC structure that contains sample information to write to the output surface.
This method can be used to pack single columns or rectangular regions of a surface from a buffer of contiguous samples. It can pack columns or regions row-by-row into equally spaced, noncontiguous regions by setting the lRowPadding member of DXPACKEDRECTDESC to nonzero.
The size of the buffer required is [ (Width+lRowPadding) * (Height - 1)) + Width ]. If lRowPadding is zero, this is equivalent to Width*Height.
The method packs samples from the buffer into the surface, beginning with the sample at the upper-left corner of the rectangle and continuing until it reaches the end of the row. It then adds lRowPadding samples to the buffer pointer and packs the next row.
After this call is made, the current position of the pointer object is undefined. Call IDXARGBReadPtr::MoveToRow, IDXARGBReadPtr::MoveAndGetRunInfo, or IDXARGBReadPtr::MoveToXY to re-establish the pointer location before calling any method that uses the current pointer location.