GTKImage displays after long latency



Hi --

This is my first GTK application, and I'm "simply" trying to display an SVG rendering in a window. I can do this OK, but it appears that there is a latency of ~2000ms between assigning the pixbuf into the GTKImage widget and actually seeing the result on the screen.

FYI, the scribble example works fine on my system ... so I don't think there's something wrong with the system ... more likely a gap in my GTK knowledge.

Here's what I'm doing:

  GdkPixbuf *pb = rsvg_pixbuf_from_file_at_size("circle.svg",-1,-1,NULL);
  gtk_image_set_from_pixbuf((GtkImage*) mapimage, pb);

And before that, this is what I did:

  GtkWidget *mapimage = NULL;
  GdkPixbuf *pb = rsvg_pixbuf_from_file_at_size("circle.svg",-1,-1,NULL);
  mapimage = gtk_image_new_from_pixbuf(pb);

I can see that scribble does things quite differently ...

... should I be trying to get librsvg to render into something besides a new pixbuf??

(I'm quite sure that the librsvg call is finished, and the gtk_image_new_from_pixbuf has finished ... and *then* it takes 2 seconds to show up on the screen.)

Thanks!










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