delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/05/11/11:57:44

Date: Tue, 11 May 93 10:03:34 CST
From: (csaba AT vuse DOT vanderbilt DOT edu) <csaba AT vuse DOT vanderbilt DOT edu>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Forwarded message...

------------------------------
From: csaba AT vuse DOT vanderbilt DOT edu  <csaba AT 129 DOT 59 DOT 100 DOT 1>
Tue, 11 May 93 09:45:34 CST
To: gilliard AT lectra DOT fr
Cc:
Subject: Re: bitmap brush with transparent colors

On Tue, 11 May 1993 10:14:58 GMT,
   Gilliard Laurent Pierre writes:

>
>>How can we create bitmap brushes with one color (background)
>>considered as a transparent color ?
>
>!Graphic cursors are ok for this.
>
>But ??? how can i draw more than one same cursor on the screen ???

You can have as many cursors as you want. Use GrCreateCursor, 
GrDisplayCursor, etc.. The mouse cursor is just one of the possible 
cursors -- and the library treats it differently than any of the other 
cursors.


>I've tried to draw cursor at x,y, then GrBitBlt(NULL,x,y,NULL,x,y,x+cursor![D![D![D![CWcursor,y+Hcursor),
>but cursor seems to be erased before GrBitBlt.
>

You can use the non-clipping BitBlt (BitBltNC) which does not erase the 
mouse cursor. If you use ANY cursor OTHER THAN the mouse cursor, it is not 
erased anyway.

> can i turn off this automatic detection with cursors?????
>
>Thanks.
>
>PS: In next version of LibGrx, a GrBitBlt with transparent mode option would be fine.

BitBlt only supports (and will support) transfer modes which can be 
implemented directly without having to examine the contents of every pixel 
to figure out what to do with it. (This can be VERY expensive in some 
modes) You can always do what I did with the cursors: Create two contexts, 
AND the first to the screen to zero out the pixels where you want new 
colors, then OR the second to set these same pixels to their new colors.


Csaba Biegl
csaba AT vuse DOT vanderbilt DOT edu
----- forwarded message ends here -----

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019