Re: painting a custom widget



Trey Tabner <ttabner bynari net> writes:
the widget i've just created repaints itself on every GDK_EXPOSE event. 
this way i am sure that it will always appear correctly on the screen
instead of some areas not being painted, or worse, the whole thing.  but
this way i'm doing it seems a bit harsh on the cpu, when i scroll the
widget it repaints nonstop.  is this the way it should be?  i doesn't
seem bad on all the workstations i develop on, but i tried it on a
slower, low end machine and it was slow and noticeable.  am I going at
this the wrong way?  and if so, what's the correct way?


If you repaint the whole widget, it's probably not that efficient; try
repainting only the exposed area.

But it's hard to say other than that why it would be slow, there are
any number of slow things you could be doing...

Havoc




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