🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #149

TRANSPARENT1 - How does it work?

#149
From: Chao-Kuei Hung
Date: Sat, 01 Aug 1992 02:15
45 lines
2085 bytes
Dear Netters:

	I am a novice in DDK area, I hope this is not a FAQ. If so, please
forgive me.

        The DDK document said for BitBlt() and StretchBlt(), driver has to 
check both bkMode member of the lpDrawMode and Rop3 parameter to carry out 
the transfer if driver set C1_TRANSPARENT in dpCaps1 of GDIINFO. I am kind 
of confused by the bkMode == TRANSPARENT1 case. I cannot get a clear 
definition of what drivers should do if bkMode is equal to TRANSPARENT1.

        So I came out some possible scenarios for this case:

        1. ROP3() first then check the result to decide wether we 
           want to update destionation or not.

           tempD= ROP3(S,P,D);                  
           if (tempD == bkColor)
                Leave D as is;
           else
                D= ROP3(S,P,D);

        2. Check Source and Brush first. If either one is equal to background
           color of destination, we don't do ROP3() to change the 
           destionation.

           if (S == bkColor || P == bkColor)
                Leave D as is;
           else
                D= ROP3(S,P,D);

        3. Check Source and Brush first. If both are equal to background 
           color of destination, we don't do ROP3() to change the 
           destionation.

           if (S == bkColor && P == bkColor)
                Leave D as is;
           else
                D= ROP3(S,P,D);

        I don't know which scenario I should go. Probably neither one is
correct. Please help me clear the idea of this background mode. Thank you
guys very much!

Henri C. Chen.  July 31, '92
Technical Details
Message-ID: <l7jsu0INN259@girtab.usc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!chaph.usc.edu!news

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!chaph.usc.edu!news
From: ckhung@girtab.usc.edu (Chao-Kuei Hung)
Newsgroups: comp.windows.ms.programmer,comp.os.ms-windows.programmer.misc
Subject: TRANSPARENT1 - How does it work?
Date: 31 Jul 1992 19:15:28 -0700
Organization: University of Southern California, Los Angeles, CA
Lines: 45
Sender: chaokuei@girtab.usc.edu
Distribution: world
Message-ID: <l7jsu0INN259@girtab.usc.edu>
NNTP-Posting-Host: girtab.usc.edu