[Gtk-sharp-list] Custom Widget Animation Degrades Over Time
aaron at radich.com
Thu Jul 29 16:09:54 EDT 2010
Thanks for the tips. I like what you're suggesting with the
Gtk.Window. Currently my control is based on Gtk.Bin and it contains a
DrawingArea. What would you suggest I use in order to have the control
contain it's own window that can be scrolled? Long term I'd like to
create a control that is a Carousel that can be continually spun to the
left or right by clicking and dragging on the control. For example, it
could be used to show the photos in a photo album. You could load up 50
photos. The control would only show 4 or 5 photos on the controls
visible drawing area at any one time. You could then spin it to the left
or right in a continuous loop.
> On Thu, Jul 29, 2010 at 1:40 PM, Aaron Radich
<aaron at radich.com> wrote:
>> I've created a custom
marquee widget that displays scrolling text and
similar. The widget works great when first ran, but over time
>> slows down eventually grinding down to a halt/freeze. I'm
>> there is some sort of resource issue that I am
not managing wisely.
>> of the magic for
the display happens in the DrawingArea's ExposeEvent,
I am forcing to fire with the DrawingArea.QueueDraw() method call
>> (looping triggered from a GLib.Timeout). Does anyone see
>> might be contributing to my performance
> Nothing jumps out immediately - I
suggest you try profiling with
> heap-shot and the statistical
profiler. You're probably leaking
> resources of some kind.
> FWIW you could make the code a fair bit more efficient
> Pixbufs instead of System.Drawing.*.
> If the widget has its own GdkWindow you could call
> in the timeout to do a more efficient movement
of the contents, then
> have the expose event simply paint the
remaining invalidated region.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gtk-sharp-list