Describes a rectangular array of pixels in a DXSurface.
Syntax
typedef struct tagDXPACKEDRECTDESC { DXBASESAMPLE *pSamples; BOOL bPremult; RECT rect; long lRowPadding; } DXPACKEDRECTDESC;
Members
- pSamples
- Pointer to destination buffer used to hold the unpacked data. A buffer must be supplied for all surface formats and implementations.
- bPremult
- Value indicating the format into which the samples will be unpacked. If FALSE, the samples will be unpacked into ARGB32 format. If TRUE, the samples will be unpacked into the alpha-premultiplied PMARGB32 format.
- rect
- Rectangular region to unpack. Both coordinates are relative to the locked region.
- lRowPadding
- Value that is the difference between the width of the buffer of samples pointed to by pSamples and the width of the rectangle in rect. For instance, if rect is 5 pixels wide, but the pSamples buffer is 12 pixels wide, lRowPadding should be set to 7. If the width of rect and the buffer pSamples is the same, the value of lRowPadding should be set to zero. This value must be supplied by you when calling either PackRect or UnPackRect.
Remarks
This structure was created to save memory when storing small images in large regions. The row padding subtracted from the rectangle width gives the number of samples per row.
See Also
DXPMSAMPLE, IDXARGBReadPtr::UnpackRect, IDXARGBReadWritePtr::PackRect
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.