Results 1 to 3 of 3

Thread: Inverting colors on Line command???

  1. #1
    Guest

    Question

    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.

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    Set the drawmode of the object you are drawing on to 7 (vbxorpen). Now your lines will invert the colors.
    Oetje
    [email protected]
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  3. #3
    Guest

    Thanks!

    Wow! That was an easy answer to something I though was difficult to do in VB!

    Thank you my friend!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width