MaskBlt implementation.

Dimitrie O. Paun dpaun at rogers.com
Tue Apr 8 23:13:44 CDT 2003


On April 8, 2003 05:42 pm, Jaekil Lee wrote:
> Now, I'm implementing MaskBlt using BitBlt.
> I posted same code in www.codeproject.com as MaskBlt in Windows 9x.

Suggestions:
  -- get rid of the C++ stuff (the ::)
  -- provide a patch (see http://www.winehq.org/?page=sending_patches)

Small nits (IMHO):
  -- get rid of ROP3FromIndex(), just use ROP3Table directly
  -- rewrite SwapROP3_SrcDst() (see below)
  -- this is really picky, but I'd rename {FORE,BACK}_ROP3 to 
     something a little more common like {FOREGND,BKGND}_ROP3
     I found BACK a little confusing here.

Possible SwapROP3_SrcDst() replacement:

BYTE SwapROP3_SrcDst(BYTE bRop3)
{
    /* swap 1,2 bit and 5,6 bit */
    BYTE bit1 = (bRop3 & 0x04) ? 0x02 : 0;
    BYTE bit2 = (bRop3 & 0x02) ? 0x04 : 0;
    BYTE bit5 = (bRop3 & 0x40) ? 0x20 : 0;
    BYTE bit6 = (bRop3 & 0x20) ? 0x40 : 0;
    return (bRop3 & 0x99) | bit1 | bit2 | bit5 | bit6;
}

-- 
Dimi.




More information about the wine-devel mailing list