RE: draw signals



Carlos,

Thanks for your response.  I would love to forget about "draw" :-)  However, I
don't see how I can.  Everytime I uncover a portion of a window with a pixmap in
it, I get an "expose_event" (which I use to refresh the screen) and a "draw"
signal which repaints my pixmap and then refreshes the screen a second time.
The repainting of my pixmap seems unnecessary IMHO and is forcing me to allocate
memory and attach data to every pixmap I use.  I would like to eliminate this
redundancy so that I don't need to use up the extra memory and waste time doing
the same thing twice.  Any ideas on how to solve this problem would be greatly
appreciated!



                                -- Stupid Genius
P.S.
I guess I just don't understand why a "draw" signal is emitted when an
"expose_event" appears to be all that is needed.

----------
From:         Carlos Pereira[SMTP:carlos pehoe civil ist utl pt]
Sent:         Friday, December 22, 2000 12:09 PM
To:   gtk-app-devel-list gnome org
Subject:      Re: draw signals

Opps, let me correct myself.  I'm finding that a "draw" AND an "expose_event"
are being emitted.  Is there any way to filter this so that only the
"expose_event" is acted upon.  My pixmaps are being refreshed by the
"expose_event" and then redrawn by the "draw" signal unnecessarily.  By doing
so
it is forcing my to allocate memory for the redraw, when I don't really need
to.
The pixmap hasn't changed, so I only need to refresh it.  In and all help
would
be greatly appreciated.  Thanks in advance!


I might be wrong, so don't take my words for granted,
but I really believe you will be much better if you
just forget about "draw" signals at all. You don't
need "draw" for nothing. Just forget that it exists.
Do yourself a favor and erase "draw" from your app, completely,
your app will be simpler and will behave better.

"expose_event" "configure_event" and "motion_notify_event"
are the signals you usually need when handling complex
drawing areas (or opengl_areas for that matter).

Carlos

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





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