GtkImage redraw "issues"



problem:
  so im using a GdkPixmap as a backend for a GtkImage.  the problem im
having is that they are not redrawing.  hell, i dont know if they are
ever drawing.  im not loading from an image file, the pixmap is created
manually.  additionally, the pixmap gets altered and the GtkImage needs
to be able to be updated at anytime.  i know it's not the non-Gtk stuff
because it worked fine when i was using a GtkDrawingArea.  the API
documentation is a little vague about GtkImages with GdkPixmaps
especially since it didnt mention that GtkImage has no "window" which
breaks the fake OO.  ive posted pertainent code here because you need it
to figure out what im really doing: http://pastebin.com/533165

background info:
  i dont know about Gtk's "referencing" system as it's not documented,
as far as i know.  additionally, there are no tutorials for
GtkDrawingArea and GtkImage.  i think the referencing may be part of
this issue because it is mentioned on the GtkImage API documentation
page but i really dont know as it's completely alien to me.

why im not (still) using GtkDrawingArea:
  i had previously used a GtkDrawingArea (and it worked) but i ran into
a few problems.  first, it does not allocate the memory for the image
until it was exposed.  i used a Insight, my gdb based debugged to verify
this.  all functions to invalidate/expose it failed to be effective at
all.  second, i have to draw on it when a file is loaded which can come
before it is ever exposed.  third, i really cant afford to use a pixmap
buffer or something because my image is 64MB in size and is in an
encoded format which is too slow to be decoded on the fly.  also, about
28MB of the image can be displayed at once so using a buffer is still a
bad idea.  with this major pain in the ass i have to use a pixmap in
combonation with a GtkImage because it does not copy the data at all.




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