Функция _WinAPI_SetDIBits

 ↑  ←  Описание функции


_WinAPI_SetDIBits

Sets the pixels in a compatible bitmap using the color data found in a DIB

#include <WinAPI.au3>
_WinAPI_SetDIBits($hDC, $hBmp, $iStartScan, $iScanLines, $pBits, $pBMI [, $iColorUse = 0])

Параметры

$hDC Handle to a device context
$hBmp Handle to the compatible bitmap (DDB) that is to be altered using the color data from the DIB
$iStartScan Specifies the starting scan line for the device-independent color data in the array pointed to
    by the pBits parameter.
$iScanLines Specifies the number of scan lines found in the array containing device-independent color data
$pBits Pointer to the DIB color data, stored as an array of bytes. The format of the bitmap values
    depends on the biBitCount member of the $tagBITMAPINFO structure pointed to by the pBMI parameter.
$pBMI Pointer to a $tagBITMAPINFO structure that contains information about the DIB
$iColorUse [необязательный] Specifies whether the iColors member of the $tagBITMAPINFO structure was provided and, if so,
    whether iColors contains explicit red, green, blue (RGB) values or palette indexes. The iColorUse parameter
    must be one of the following values:
    0 - The color table is provided and contains literal RGB values
    1 - The color table consists of an array of 16-bit indexes into the logical palette of hDC

Возвращаемое значение

Успех:Возвращает True
Ошибка:Возвращает False

Примечания

The device context identified by the hDC parameter is used only if the iColorUse is set to 1, otherwise it is
ignored. The bitmap identified by the hBmp parameter must not be selected into a device context when this
function is called. The scan lines must be aligned on a DWORD except for RLE compressed bitmaps. The origin
for bottom up DIBs is the lower left corner of the bitmap; the origin for top down DIBs is the upper left
corner of the bitmap.

См. также

$tagBITMAPINFO

См. также

Искать SetDIBits в библиотеке MSDN