Hi I need to move a shape (say for example a 5 mm circle) across a drawing, however as the shape moves it needs to redraw what was on the page before the shape got there.

Thanks Wallace

I remember a conversation like this with someone once before and it was hard for them to picture.

I assume you have an image component and in there is your drawing, and that when the user selects 5mm circle one appears say in the top left hand corner, and they can then direct it to where they want, so you're drawing direct on the drawing? or are you using the "shape" component?

If its a component you're using you move components by using top and left.. but they teleport, so if you want to show things moveing across, then you would have to move them to places along the way.

If its drawing a circle like MSpaint, so you have a drawing area and an item you may/maynot want to keep on it, but you're drawing a circle on it, then you would need to keep a history in memory of what it looked like before hand and be able to repaint it, so theres 2 images in your app 1 with, 1 without. so then when it moves, you copy the without and draw your circle in its new position on it.

Hope that makes some sense.. Your question wsa a little unclear (I know how it can be when you're looking at it and the question seems to make perfect sense to you)

By way of example, look at

http://www.youtube.com/watch?v=T4tH_UQWw-Q&feature=related

The CNC's have basically 2 move commands, rapid and feed (Feed is while you are cutting)

I have rapid and feed movements shown on my graphic in Red and Blue using fDraw.Canvas.LineTo. I now want to add the tool shape, but as the tool moves along it's path I do not want to erase the previous Rapid and Feed lines.

I need to look ahead of the Tool shape as it moves Pixel by Pixel store the details and repaint as it moves past or possibly set the tool to a new layer so it does not over write the original graphic as can be done in AutoCad.

Then you are indeed talking of holding 2 copies of the picture, one without the tool and then as you make changes to the component, you update the second one, and draw a copy of it, and then the tool in your drawing area.

In essense then you draw on a bitmap in memory only, and then paint it to the image component, and then draw the tool at an appropriate place.

This article has been dead for over six months. Start a new discussion instead.