Re: Please give me some suggestion about my application



On Tue, 12 Aug 2008 22:27:28 +0800
"Lazy Fox" <lazy fox wu gmail com> wrote:

> I want to draw a loopback-able dynamic curve, just like the following
>picture:
>http://www.nlm.nih.gov/medlineplus/ency/images/ency/fullsize/18030.jpg
>
>The curve is keeping going, from left to right. When reach the right border,
>it will loopback to the left border, and do this again and again.
>
>But, when the curve loopback to the left border, the existent drawing will
>not
>be erased immediately. Instead, the older drawing will be erased step by
>step,
>where the new curve is drawing.
>
>Considering the efficiency. In this case, which widget should I draw on?
>How can I erase the image step by step,
>not erase all of it? Which function should I use?
>
>--
The Goo::Canvas can make those shapes easily with it's polyline. All you would need 
to do is write the plot in a group, then when the plot reaches the right side, remove the polyline,
or the group, with remove_child(). That would blank it. Then restart drawing the polyline
at the left edge.

I think if you were on a DrawingArea, just draw a black filled rect over the area to blank it out.

I write almost exclusively in Perl, but the c should work the same.

zentara

-- 
I'm not really a human, but I play one on earth.
http://zentara.net/Remember_How_Lucky_You_Are.html 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]