Re: the right way to draw in a drawingarea



Paul Davis wrote:

Paul Davis wrote:

On Wed, 2005-10-12 at 00:17 -0500, the other Paul Davis wrote:
The complexities abound. Insert apropriate quote here. I can't explain the gtk drawing system because I don't entirely understand it. I'm glad hings are working.


there is really nothing mysterious is you remember one simple rule:

    draw on your widget's window ONLY in an expose event handler.

the point of queue_draw() is to request that the GTK event loop
schedules an "artificial" expose event at an appropriate time.
otherwise, you don't have an expose event available to make whatever
change it is that you want to make. drawing on widgets' windows from
anywhere else is wrong, and will lead to unpredictable results.

--p (the other other Paul Davis)



Wow. I was getting really confused for a second wondering how it is that I'm writing emails I don't remember.

Anyway, I agree exactly with what Other Paul is saying. I just don't know why it's so. Other than its the way things were intended.

I'll take a look at adding to an example.

Paul





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