|
-
Apr 4th, 2003, 07:06 AM
#1
Thread Starter
Member
how to move a selected object?
Hi,
In my software lots of objects are there. When user wants to move one of them he selects it and moves it by keystrokes.
What should I do to remove previous image of an object from previous position? Redrawing all objects will be very costly.
I have hered of XOR, but I dont know how to use it.
Plz help me.
If possible give some example.
Any help will be appreciated.
Thanx.
-
Apr 4th, 2003, 07:39 AM
#2
Fanatic Member
Save a picture of the background before you put the object there, then restore it when it moves (make sure all objects leave in the OPPOSITE order they appeared, or you might get some bugs) make sure you use a mask for restoring background too... don't want to cover other objects...
Don't pay attention to this signature, it's contradictory.
-
Apr 4th, 2003, 08:54 AM
#3
Frenzied Member
xor=for example:
0101 xor
0110 =
0011
you see, 1 xor 1 = 0, 0 xor 0 = 0, only 1 xor 0 and 0 xor 1 = 1
i dont know what to use this for other than electric components...but i cant see how you assosiate this with painting a picture...
look here: http://www.vbforums.com/showthread.p...hreadid=238634
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|