网站首页  词典首页

请输入您要查询的函数:

 

术语 setdibits
释义 SetDIBits
语法:
int SetDIBits(
__in HDC hdc,
__in HBITMAP hbmp,
__in UINT uStartScan,
__in UINT cScanLines,
__in const VOID *lpvBits,
__in const BITMAPINFO *lpbmi,
__in UINT fuColorUse
);
SetDIBits功能
该SetDIBits函数设置了一个兼容位图(DDB)使用颜色的像素数据中找到指定的DIB。
参数
hdc [in]
一个句柄,设备上下文。
骨形成蛋白 [in]
一个句柄,兼容位图(DDB),即是改变使用从指定的DIB的颜色数据。
uStartScan [in]
出发扫描线的设备数组中的独立的色彩数据指出lpvBits参数的。
cScanLines [in]
在扫描阵列包含设备独立的色彩数据发现的行数。
lpvBits [in]
一个DIB的颜色数据,作为一个字节数组存储的指针。位图的值的格式对BITMAPINFO结构biBitCount成员取决于所指向的lpbmi参数。
lpbmi [in]
一个BITMAPINFO结构,它包含有关DIB信息的指针。
fuColorUse [in]
指示是否BITMAPINFO结构的成员bmiColors提供了,如果有的话,是否包含了明确的bmiColors红,绿,蓝(RGB)值或调色板索引。该fuColorUse参数必须是下列值之一。
ValueMeaning
DIB_PAL_COLORS颜色表由一组16,进入其中的HDC参数确定的设备上下文逻辑调色板位索引。
DIB_RGB_COLORS颜色表提供,并包含文字RGB值。
返回值
如果函数成功,返回值是复制的扫描线数。
如果函数失败,返回值是零。
这可能是下面的值。
返回codeDescription
ERROR_INVALID_PARAMETEROne或输入参数更是无效的。
备注
优化位图绘制时获得的速度是位图位已经进入系统调色板索引。
应用程序可以通过调用函数的GetSystemPaletteEntries系统调色板颜色和索引。之后,颜色和索引检索,应用程序可以创建的DIB。有关更多信息,请参阅系统调色板。
该设备上下文的参数确定的HDC是只会在DIB_PAL_COLORS常数为fuColorUse参数设置,否则会被忽略。
人骨形成蛋白参数的确定的位图不能选择到设备上下文当应用程序调用该函数。
扫描必须遵循的一个DWORD除了游程压缩位图线。
对于自下而上的起源行动的DIB是左下角位图的角落;为自上而下的DIB的起源是左上角位图的角落。
ICM的:色彩管理是执行,如果色彩管理已与调用SetICMMode设置为ICM_ON的iEnableICM参数启用。如果lpbmi有BITMAPV4HEADER,指定伽马和终端的成员,或指定任何BITMAPV5HEADERγ和端点的成员或profileData和profileSize的成员,那么调用中指定的位图视为是在色彩空间描述表示,位图的像素这些成员,而不是在设备方面的源色彩空间。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
位图概述
位图功能
GetDIBits
GetSystemPaletteEntries
BITMAPINFO
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==SetDIBits Function
The SetDIBits function sets the pixels in a compatible bitmap (DDB) using the color data found in the specified DIB.
Syntax
int SetDIBits(
__in HDC hdc,
__in HBITMAP hbmp,
__in UINT uStartScan,
__in UINT cScanLines,
__in const VOID *lpvBits,
__in const BITMAPINFO *lpbmi,
__in UINT fuColorUse
);
Parameters
hdc [in]
A handle to a device context.
hbmp [in]
A handle to the compatible bitmap (DDB) that is to be altered using the color data from the specified DIB.
uStartScan [in]
The starting scan line for the device-independent color data in the array pointed to by the lpvBits parameter.
cScanLines [in]
The number of scan lines found in the array containing device-independent color data.
lpvBits [in]
A 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 BITMAPINFO structure pointed to by the lpbmi parameter.
lpbmi [in]
A pointer to a BITMAPINFO structure that contains information about the DIB.
fuColorUse [in]
Indicates whether the bmiColors member of the BITMAPINFO structure was provided and, if so, whether bmiColors contains explicit red, green, blue (RGB) values or palette indexes. The fuColorUse parameter must be one of the following values.
ValueMeaning
DIB_PAL_COLORS The color table consists of an array of 16-bit indexes into the logical palette of the device context identified by the hdc parameter.
DIB_RGB_COLORS The color table is provided and contains literal RGB values.

Return Value
If the function succeeds, the return value is the number of scan lines copied.
If the function fails, the return value is zero.
This can be the following value.
Return codeDescription
ERROR_INVALID_PARAMETEROne or more of the input parameters is invalid.

Remarks
Optimal bitmap drawing speed is obtained when the bitmap bits are indexes into the system palette.
Applications can retrieve the system palette colors and indexes by calling the GetSystemPaletteEntries function. After the colors and indexes are retrieved, the application can create the DIB. For more information, see System Palette .
The device context identified by the hdc parameter is used only if the DIB_PAL_COLORS constant is set for the fuColorUse parameter; otherwise it is ignored.
The bitmap identified by the hbmp parameter must not be selected into a device context when the application calls this function.
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.
ICM: Color management is performed if color management has been enabled with a call to SetICMMode with the iEnableICM parameter set to ICM_ON. If the bitmap specified by lpbmi has a BITMAPV4HEADER that specifies the gamma and endpoints members, or a BITMAPV5HEADER that specifies either the gamma and endpoints members or the profileData and profileSize members, then the call treats the bitmap's pixels as being expressed in the color space described by those members, rather than in the device context's source color space.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
See Also
Bitmaps Overview
Bitmap Functions
GetDIBits
GetSystemPaletteEntries
BITMAPINFO
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd162973(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:24:53