mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-31 09:21:26 +00:00
Add comment regarding the windows bitmap processing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@39482 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
457ca77b6b
commit
4cfd709225
1 changed files with 11 additions and 0 deletions
|
@ -2931,6 +2931,17 @@ LRESULT CALLBACK windowEnumCallback(HWND hwnd, LPARAM lParam)
|
|||
HBITMAP hOldAndMaskBitmap = (HBITMAP)SelectObject(hAndMaskDC, hAndMaskBitmap);
|
||||
HBITMAP hOldXorMaskBitmap = (HBITMAP)SelectObject(hXorMaskDC, hXorMaskBitmap);
|
||||
|
||||
/* On windows, to calculate the color for a pixel, first an AND is done
|
||||
* with the background and the "and" bitmap, then an XOR with the "xor"
|
||||
* bitmap. This means that when the data in the "and" bitmap is 0, the
|
||||
* pixel will get the color as specified in the "xor" bitmap.
|
||||
* However, if the data in the "and" bitmap is 1, the result will be the
|
||||
* background XOR'ed with the value in the "xor" bitmap. In case the "xor"
|
||||
* data is completely black (0x000000) the pixel will become transparent,
|
||||
* in case it's white (0xffffff) the pixel will become the inverse of the
|
||||
* background color.
|
||||
*/
|
||||
|
||||
// Scan each pixel of the souce bitmap and create the masks
|
||||
int y;
|
||||
int *pixel = (int*)[rep bitmapData];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue