[cairo] How to refer Cairo::Context outside on_expose_event
Murray Cumming
murrayc at murrayc.com
Tue May 5 11:50:19 PDT 2009
On Mon, 2009-05-04 at 10:14 +0800, 陈凯 wrote:
> Unfortunately, the execution always crashes because get_window() in
> the constructor returns NULL.
That's because get_window() never returns the GDK window until the
widget is realized. That means that the earliest you can discover it is
in on_realize().
But I don't know if you can keep the cairo context like that instead of
getting it each time.
--
murrayc at murrayc.com
www.murrayc.com
www.openismus.com
More information about the cairo
mailing list