2008 November 21th Friday (十一月 二十一日 金曜日)

   I have to learn C# due to the need of my company.  If I resist it, may I be able to be fired.  Now, under the circumstance
of the economic crisis, losting job is not a good thing.

  Both the altered image bitmap and the mask bitmap are selected into memory device contexts. Two BitBlt calls perform the magic.
The first does a BitBlt of the mask bitmap on the window:

BitBlt (hdc, x, y, cxBitmap, cyBitmap, hdcMemMask, 0, 0, 0x220326) ;

  This uses a raster operation for which there is no name. The logical operation is D & ~S. Recall that the source-the mask bitmap
is a white ellipse (1 bits) surrounded by black (0 bits). The raster operation inverts the source so that it's a black ellipse
surrounded by white. The raster operation then performs a bitwise AND of this inverted source with the destination the surface of
the window. When the destination is ANDed with 1 bits, it remains unchanged. When ANDed with 0 bits, the destination becomes black.
Thus, this BitBlt operation draws a black ellipse in the window.

The second BitBlt call draws the image bitmap on the window:

BitBlt (hdc, x, y, cxBitmap, cyBitmap, hdcMemImag, 0, 0, SRCPAINT) ;

The raster operation performs a bitwise OR operation between the source and the destination. The outside of the source bitmap is black,
so it leaves the destination unchanged. Within the ellipse, the destination is black, so the image is copied unchanged.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值