Re: Drawing with cairo

Igor Gorbounov wrote:
Diego A. Fons пишет:
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?
Why, it works! Those are just examples. I use a context variable
as a member of my Plot class, and this variable is assigned in
an initialization method, and reassigned when plot area is resized.
    Igor Gorbounov

Strange because I have kind of the same experience as Diego...

At least using gtk-- and storing the cairo context obtained at
configure time (maybe not at realization time, I have tried many variants I do not remember if I tried that variant), to use it in the handling of expose events just did not work. I had to request a new cairo context for each expose events.

I never had time to fully investigate the problem, but I certainly had a similar experience...


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