Re: Animating one object moving in front of another
- From: Peter Duniho <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Thu, 15 Nov 2007 18:50:50 -0800
On 2007-11-15 16:40:16 -0800, "Peter Webb" <webbfamily@xxxxxxxxxxxxxxxxxxxxxxxxx> said:
[...]
So the solution you have identified doesn't seem to work, as the background is not a constant image - it needs a few pixels added each time to show the update tracks. You don't actually see this new track background until the circle moves and stops obscuring it.
Given your description, I personally would not bother with maintaining a copy of the background at all. Instead, I would just keep a list of the points defining the orbital tracks, and redraw the tracks each time for an update. I know it sounds like a lot of drawing effort, but in reality the time taken to redraw the tracks from scratch will be inconsequential.
That said, nothing about my proposal precludes what you're trying to do. Assuming you've got a background image cached somewhere, there's nothing to stop you from updating it as necessary if and when the background is supposed to change as well. There's no point in that process in which you'd need to clone the existing background though.
[...]
PS I have never even heard of WPF, but what I want to do sounds so simple and common that I think there must be a very simple answer - just being able to copy a Graphics buffer should solve my problem
Copying the background buffer is overkill. Also, IMHO you should be more precise about your terminology. There's not really anything called a "Graphics buffer" in .NET. There's a Graphics object, which is a sort of portal into a buffer (like a Bitmap, Metafile, or even BufferedGraphics), and there's a BufferedGraphics (which you obviously know about). It's not really clear when you write "Graphics buffer" which you're talking about, if either.
Pete
.
- Follow-Ups:
- Re: Animating one object moving in front of another
- From: Peter Webb
- Re: Animating one object moving in front of another
- References:
- Animating one object moving in front of another
- From: Peter Webb
- Re: Animating one object moving in front of another
- From: Peter Duniho
- Re: Animating one object moving in front of another
- From: Peter Webb
- Animating one object moving in front of another
- Prev by Date: Re: Embedded scripting language
- Next by Date: Re: C# case sensitive or not
- Previous by thread: Re: Animating one object moving in front of another
- Next by thread: Re: Animating one object moving in front of another
- Index(es):
Relevant Pages
|