[gtkmm] flickering problems when writing backing pixmap over window



(apologies if you see this message twice)
Dear list,

First, a very very big thank you for writing gtkmm and gtk+! I know I would
not be able to do graphical programming otherwise.

Now for my problem. I'm writing a real time graph for my netlink++ QoS
product (open source) but no matter what I do, it still flickers on update.
Full source exhibiting the problem is attached.

I do the following to my backing store d_scribble:

  d_scribble->draw_rectangle(d_bg,true,0,0,get_width(),get_height()); // clear
  // draw grid on backing store
  for(int i=0;i<3;++i) {
    d_scribble->draw_line(d_grid,0,(i+1)*get_height()/4,get_width(), (i+1)*get_height()/4);
  }

then I call draw_line some more to do the actual plotting. This all happens
from on_timeout. Finally, I call queue_draw().

In expose_event I then do:

  d_win->draw_drawable(d_bg,d_scribble,0,0,0,0);  // write the backing store

Any clues on how to get this working more smoothly? I've tried a number of
things to improve on this, like using d_win->draw_drawable(d_bg,
d_win,5,0,0,0) to shift the pixmap 'in place', but it all does not help.

Thanks for your attention,
	Bert.

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO



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