Drawing with cairo



Hi,

I'm implementing my own widget to render some plots. In all the tutorials and help I've seen the cairo context, needed to draw, is _created_ in the on_expose_event() handler, so every time i have to redraw the plot I have to draw it completely! My question is if there is a way of preserve the cairo context intact between the the calls to on_expose_event()? Why getting the cairo context in the on_realize() handler and storing it in a variable doesn't work?

Regards,
Diego A. Fons.


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