PDA

Click to See Complete Forum and Search --> : Inverting colors on Line command???


Oct 7th, 2000, 04:52 PM
Hi.

I need to know if it is possible to do the equivalent of a BitBLT with SRCINVERT (inverting pixels when copying) except not for Bitblt but for drawing a line?

I know I could create my own function using getpixel and setpixel, but that means I have to read and set EVERY pixel of the line I wish to draw, which is quite slow.

So just to make sure I'm clear:
- I draw a green line on a black background.
- the line I draw crosses another line which is red.
- I want the point where the to lines cross to be inverted (yellow I think).

If anyone knows something about this, I would appreciate.

oetje
Oct 8th, 2000, 03:30 AM
Set the drawmode of the object you are drawing on to 7 (vbxorpen). Now your lines will invert the colors.

Oct 8th, 2000, 11:09 AM
Wow! That was an easy answer to something I though was difficult to do in VB!

Thank you my friend!