Show/Hide Toolbars

RiverSoftAVG Products Help

Navigation: Code Documentation > RSVML > RSGdiPlusGraphics > Classes > TRSGPBitmap > Methods

TRSGPBitmap.LockBits(TRectF,TRSGPImageLockFlags,TRSGPPixelFormatRec,TRSGPBitmapData) Method

Scroll Prev Top Next More

Locks a rectangular portion of this bitmap and provides a temporary buffer that you can use to read or write pixel data in a specified format. Any pixel data that you write to the buffer is copied to the Bitmap object when you call  UnlockBits.

Namespace: RSGdiPlusGraphics

Parameters

aRect

Type: TRectF

Specifies the portion of the bitmap to be locked.

Flags

Type: TRSGPImageLockFlags

Set of flags that specify whether the locked portion of the bitmap is available for reading or for writing and whether the caller has already allocated a buffer.

aFormat

Type: TRSGPPixelFormatRec

Specifies the format of the pixel data in the temporary buffer. The pixel format of the temporary buffer does not have to be the same as the pixel format of this Bitmap object.

Data

Type: TRSGPBitmapData

A TRSGPBitmapData record. If the user input buffer flag of the flags parameter is cleared, then Data serves only as an output parameter. In that case, the Scan0 data member of the TRSGPBitmapData record receives a pointer to a temporary buffer, which is filled with the values of the requested pixels. The other data members of the TRSGPBitmapData record receive attributes (width, height, format, and stride) of the pixel data in the temporary buffer. If the pixel data is stored bottom-up, the Stride data member is negative. If the pixel data is stored top-down, the Stride data member is positive. If the user input buffer flag of the flags parameter is set, then Data serves as an input parameter (and possibly as an output parameter). In that case, the caller must allocate a buffer for the pixel data that will be read or written. The caller also must set the Scan0 data member of that TRSGPBitmapData record to the address of the buffer, and set the other data members of the TRSGPBitmapData record to specify the attributes (width, height, format, and stride) of the buffer.

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb