05-26-2010 08:24 AM
I want to draw a point, move one step, remove the old one, draw another point.
May I know how to remove a point in a picture.
Thanks,
05-26-2010 08:35 AM
You redraw the picture without the point.
If that does not help you then post some code with suppoting image and share some more details with us.
THank you,
Ben
05-26-2010 08:37 AM
Hi alex,
store the part of your image which you want to change before you draw onto it. If you want to clean it, then you redraw the old part.
May be it's also a solution for you to use your image as a background in a graph and use corsurs to draw your point.
Mike
05-26-2010 08:46 AM - edited 05-26-2010 08:46 AM
Here ya go.
05-26-2010 09:22 AM - edited 05-26-2010 09:22 AM
I made that slightly more complicated than need be... You can get rid of the shift register and just wire the picture from the flattened pixmap vi straight in to the draw point vi. Then, get rid of the concatenate strings. Something more like this.
05-26-2010 09:17 PM
What I do is mostly like for(imstuck), the difference is
1. start from an empty picture constant.
2. In the loop, first draw a white point, try to cover original one, then draw a new point with red color with moving one step.
But when I run the program, it keeps blinking. So want to find a better way to remove the old one.
Also, many points will move on the picture finally.
Thanks.
05-27-2010 07:52 AM
alex. wrote:What I do is mostly like for(imstuck), the difference is
1. start from an empty picture constant.
2. In the loop, first draw a white point, try to cover original one, then draw a new point with red color with moving one step.
But when I run the program, it keeps blinking. So want to find a better way to remove the old one.
Also, many points will move on the picture finally.
Thanks.
Right-click the picture and make sure the option "Erase first" is not enabled.
Also throttle the updates of the picture. A human can barely decern a screen update faser than 30 Hz. Updating more often will be a waste of CPU and could actually backup the graphics display unpdates.
Ben