RE: draw signals



I see...  but if all that has happened is that a pixmap became exposed, why
have a handler redraw the pixmap if nothing has changed and a simple screen
update will do?  It seems somewhat inefficient to do so, especially if
multiple pixmaps are involved.  If I can find a way to only update the
screen with an existing pixmap then I can save time and memory :-)  I guess
that's the problem I'm trying to solve: how do I prevent a pixmap from being
redrawn when a simple screen update will do?  Is it possible to do this
when, say, a window/widget gets uncovered?  The "draw" signal seems to only
complicate things during an "expose_event".  Any help with this would be
greatly appreciated.



                                -- Stupid Genius

----------
From:         Mark Leisher[SMTP:mleisher crl nmsu edu]
Sent:         Friday, December 22, 2000 11:52 AM
To:   gtk-app-devel-list gnome org
Subject:      RE: draw signals


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

I think Carlos was saying that your expose event handler should draw the
pixmap and then update the screen from the pixmap.  Then you can ignore
the
draw events.

Or does your code need to have these separate for some reason?
--------------------------------------------------------------------------
---
Mark Leisher
Computing Research Lab            Cinema, radio, television, magazines are
a
New Mexico State University       school of inattention: people look
without
Box 30001, Dept. 3CRL             seeing, listen without hearing.
Las Cruces, NM  88003                            -- Robert Bresson

_______________________________________________
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]