📄 fcdib.htm
字号:
(int x, int y)</FONT></TD><TD WIDTH="50%"> </TD></TR><TR><TD WIDTH="50%"><FONT COLOR="#FF0000">void AlphaBlendPixel
(int x, int y, RGBQUAD rgb)</FONT></TD><TD WIDTH="50%">根据rgb中的alpha通道计算。</TD></TR>
</TABLE><BR><BR><TABLE WIDTH="85%" BORDER="1" BORDERCOLOR="#3399FF" ALIGN="center" CELLPADDING="0" BGCOLOR="#CCFFFF">
<TR> <TD COLSPAN="3"> <DIV ALIGN="center"><B><FONT COLOR="#FF0000">通道处理</FONT></B></DIV></TD></TR>
<TR> <TD WIDTH="50%"> <DIV ALIGN="center">函数原型</DIV></TD><TD WIDTH="50%" COLSPAN="2">
<DIV ALIGN="center">功能</DIV></TD></TR> <TR> <TD><FONT COLOR="#FF0000">void GetRGBChannel
(FCDib * red,<BR> FCDib * green,<BR> FCDib * blue,<BR>
FCDib * alpha = NULL)<BR><BR>void GetBlueChannel (FCDib * blue)<BR>void GetGreenChannel
(FCDib * green)<BR>void GetRedChannel (FCDib * red)<BR>void GetAlphaChannel (FCDib
* alpha)</FONT></TD><TD WIDTH="40%">参数指针为NULL则表示不需要该通道。<BR> <BR> 适用于 :<FONT COLOR="#FF0000">24,32
bit</FONT></TD><TD ROWSPAN="4">所有的通道位图都为<FONT COLOR="#FF0000">8Bit</FONT>。<BR><BR>调色板为灰度调色板。</TD></TR>
<TR> <TD WIDTH="50%"><FONT COLOR="#FF0000">void CombineChannel (FCDib * red,<BR>
FCDib * green,<BR> FCDib * blue,<BR> FCDib * alpha
= NULL)</FONT></TD><TD WIDTH="40%">如果alpha = NULL,则生成的位图为24Bit,<BR>否则为32Bit。</TD></TR><TR><TD><FONT COLOR="#FF0000">void AppendAlphaChannel
(FCDib & alpha)</FONT></TD><TD>给<FONT COLOR="#FF0000">32bit</FONT>位图添加一alpha通道。</TD></TR><TR><TD WIDTH="50%"><FONT COLOR="#FF0000">void InvertAlphaChannel
()</FONT></TD><TD WIDTH="40%">翻转<FONT COLOR="#FF0000">32bit</FONT>位图alpha通道的值。</TD></TR>
</TABLE><BR><BR><table width="85%" border="1" bordercolor="#3399FF" align="center" cellpadding="0" bgcolor="#CCFFFF">
<tr> <td colspan="2"> <div align="center"><b><font color="#FF0000">调色板操作 ( <=8
bit )</font></b></div></td></tr> <tr> <td width="50%"> <div align="center">函数原型</div></td><td width="50%">
<div align="center">功能</div></td></tr> <tr><TD WIDTH="50%"><FONT COLOR="#FF0000">bool
IsGrayPalette ()</FONT></TD><td width="50%">是否为灰度位图。</td></tr><tr><TD WIDTH="50%"><FONT COLOR="#FF0000">void
SetGrayPalette ()</FONT></TD><TD WIDTH="50%">给位图设置一个灰度调色板。</TD></tr><tr><TD WIDTH="50%"><FONT COLOR="#FF0000">BOOL
GetColorTable (int index, RGBQUAD * prgb)</FONT></TD><td ROWSPAN="4" WIDTH="50%">index
:<FONT COLOR="#FF0000">从0开始计算的索引值。</FONT><BR>iNumber :获取index的个数<BR>pColors :指向RGBQUAD数组。</td></tr>
<tr> <td width="50%"><font color="#FF0000"> BOOL SetColorTable (int index, RGBQUAD
* prgb)</font></td></tr> <tr> <td width="50%"><font color="#FF0000"> BOOL GetColorTable
(int iFirstIndex, int iNumber,<br> RGBQUAD * pColors)</font></td></tr>
<tr> <td width="50%"><font color="#FF0000"> BOOL SetColorTable (int iFirstIndex,
int iNumber,<br> RGBQUAD * pColors)</font></td></tr> </table><BR><BR><TABLE WIDTH="85%" BORDER="1" BORDERCOLOR="#3399FF" ALIGN="center" CELLPADDING="0" BGCOLOR="#CCFFFF">
<TR> <TD COLSPAN="3"> <DIV ALIGN="center"><B><FONT COLOR="#FF0000">两个DIB进行处理</FONT></B></DIV></TD></TR>
<TR> <TD WIDTH="50%"> <DIV ALIGN="center">函数原型</DIV></TD><TD WIDTH="50%" COLSPAN="2">
<DIV ALIGN="center">功能</DIV></TD></TR> <TR> <TD WIDTH="50%"><FONT COLOR="#FF0000">BOOL GetSubBlock
(FCDib * SubDib,<BR> RECT & rcBlock)</FONT></TD><TD COLSPAN="2">从当前位图里剪切rcBlock指定的区域,放入SubDib中。<BR>SubDib不能为this。<BR><BR>适用于
:<FONT COLOR="#FF0000">>= 8 bit</FONT></TD></TR> <TR> <TD WIDTH="50%"><FONT COLOR="#FF0000">BOOL CoverBlock
(const FCDib & Dib,<BR> int x, int y)</FONT></TD><TD COLSPAN="2"><P>把Dib覆盖在当前位图上。左上角为(x,y)<BR>8位色不覆盖调色板。<BR><BR>适用于
:<FONT COLOR="#FF0000">>= 8 bit</FONT></P></TD></TR><TR><TD WIDTH="50%"><FONT COLOR="#FF0000">
void LogicalOperate (const FCDib & Dib,<BR> DWORD dwRop,<BR> int
x=0, int y=0)</FONT><FONT COLOR="#FF0000"><BR><BR> void AND (FCDib & Dib,
int x=0, int y=0) <BR> void OR (FCDib & Dib, int x=0, int y=0)<BR> void XOR
(FCDib & Dib, int x=0, int y=0)</FONT></TD><TD WIDTH="40%">与Dib(<FONT COLOR="#FF0000">24,32Bit色</FONT>)进行dwRop运算。<BR>dwRop
:LOG_OPERATION_AND <BR> LOG_OPERATION_OR<BR> LOG_OPERATION_XOR<BR> LOG_OPERATION_ADD<BR> LOG_OPERATION_SUB<BR> LOG_OPERATION_MUL</TD><TD ROWSPAN="3">适用于
:<FONT COLOR="#FF0000">24,32 bit</FONT></TD></TR><TR><TD WIDTH="50%"><FONT COLOR="#FF0000">void AlphaBlend
(const FCDib & MaskDib,<BR> int alpha,<BR> int x, int
y)</FONT></TD><TD WIDTH="40%">alpha :为MaskDib的权值[0..0xFF]<BR><BR>MaskDib(<FONT COLOR="#FF0000">24,32Bit色</FONT>)</TD></TR><TR><TD><FONT COLOR="#FF0000">
void AlphaBlend (const FCDib & MaskDib32,<BR> int x=0, int y=0)</FONT></TD><TD>根据MaskDib32中的alpha通道计算。<BR><BR>MaskDib32(<FONT COLOR="#FF0000">32Bit色</FONT>)</TD></TR>
</TABLE><BR><BR><table width="85%" border="1" bordercolor="#3399FF" align="center" cellpadding="0" bgcolor="#CCFFFF">
<tr> <td colspan="2"> <div align="center"><b><font color="#FF0000">剪贴板</font></b></div></td></tr>
<tr> <td width="50%"> <div align="center">函数原型</div></td><td width="50%"> <div align="center">功能</div></td></tr>
<tr> <td width="50%"><font color="#FF0000">BOOL CopyToClipboard (RECT * rect =
NULL)</font></td><td width="50%">rect :NULL为copy全图。</td></tr> <tr> <td width="50%"><font color="#FF0000">BOOL
PasteFromClipboard (RECT * rect = NULL)</font></td><td width="50%">rect :覆盖位置。</td></tr>
<tr> <td width="50%"><font color="#FF0000">BOOL IsPasteAvailable ()</font></td><td width="50%">剪贴板中的数据是否是位图。</td></tr>
</table><BR><BR><table width="85%" border="1" bordercolor="#3399FF" align="center" cellpadding="0" bgcolor="#CCFFFF">
<tr> <td colspan="2"> <div align="center"><b><font color="#FF0000">杂项函数(静态)</font></b></div></td></tr>
<tr> <td width="50%"> <div align="center">函数原型</div></td><td width="50%"> <div align="center">功能</div></td></tr>
<tr> <td width="50%"><font color="#FF0000">static RGBQUAD fooSplit16Bit_565 (WORD
wPixel)</font></td><td rowspan="4">5-6-5,5-5-5格式的16位色与RGBQUAD的转换。</td></tr> <tr>
<td width="50%"><FONT COLOR="#FF0000">static RGBQUAD fooSplit16Bit_555 (WORD wPixel)</FONT></td></tr>
<tr> <td width="50%"><FONT COLOR="#FF0000">static WORD fooCombine16Bit_565 (RGBQUAD
rgb)</FONT></td></tr> <tr> <td width="50%"><FONT COLOR="#FF0000">static WORD fooCombine16Bit_555
(RGBQUAD rgb)</FONT></td></tr> <tr> <td width="50%"><FONT COLOR="#FF0000">static
DWORD fooDibRowBytes (int iWidth,<br> int iColorBit)</FONT></td><td width="50%">DIB每行字节数。同<font color="#FF0000">FCDib::GetPitch
()</font></td></tr> <tr> <td width="50%"> <FONT COLOR="#FF0000">static BYTE fooGetGrayscale
(RGBQUAD rgb)</FONT></td><td width="50%">获得象素的灰度值。</td></tr><tr><td width="50%"><FONT COLOR="#FF0000">
static void fooSwapRGB (BYTE * prgb)</FONT></td><td width="50%">交换R与B的值。</td></tr>
<tr> <td width="50%"><FONT COLOR="#FF0000">static void fooRGBtoHLS (RGBQUAD rgb,<br>
double * H,<br> double * L,<br> double
* S)</FONT></td><td rowspan="2">RGB与HLS(色调/亮度/饱和度)之间的转换。<br> H :[0..1]<br> L :[0..1]<br>
S :[0..1]<br> <br> </td></tr> <tr> <td width="50%"><font color="#FF0000">static
RGBQUAD fooHLStoRGB (const double & H,<br> const double &
L,<br> const double & S)</font></td></tr> </table><br> <br>
<h2 align="center"><img src="stripe.gif" width="94%" height="2"><br> </h2><table align=center bgcolor=ghostwhite border=0 cellpadding=0 cellspacing=0
width=650> <tbody> <tr> <td width="85%"> <p align=center>版权所有 <br> (C)1999 - 2002
付黎<br> <a href="mailto:crazybit@263.net">给我发信</a> <a
href="javascript:window.close()">关闭窗口</a> </p></td></tr> </tbody> </table><p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -