On 17/05/2012 04:07, Andy Gilman wrote: > I am trying to write an extremely simple program, which will be animated by > showing an image, then redrawing it one pixel over, etc. > > I have followed the clock example in the tutorial with the following successes: > > the image is displayed. > the timer works > the timer connects to a function (following the clock example), > > But I can't figure out how to redraw the image. > > Here is the function that I thought would lead to the image disappearing (Header > is the drawing area): > > bool Header::update() > { > Glib::RefPtr<Gdk::Window> win = get_window(); > if (win) > { > Gdk::Rectangle r(600, 2, 70,70);// this is the rectangle where the image > is displayed > win->invalidate_rect(r, false); > }; > return TRUE; > } > > Thanks for any help. > > Andy Gilman How about just queue_draw()? I'm assuming that the clock example uses the draw signal for drawing. -- Kind regards, Loong Jin
Attachment:
signature.asc
Description: OpenPGP digital signature