Re: scribble with background image

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

 



Morton Cody wrote:
I am developing a GUI app in Linux to draw arbitrary shapes on a background image. It's just like the scribble tutorial, with the addition that I want to set a jpeg image as the background, and then draw on it. The tutorial uses a DrawingArea widget. The user is completely responsible for drawing the contents of this widget. What would I need to do to set an image as the background. Is there some other widget to be used for this ?

Yeah, you want to be using the GtkDrawingAreaWithAJPEGAsABackground widget...

Just load the JPEG into a pixbuf (gdk_pixbuf_new_from_file), and render the pixbuf into the drawing area before the user starts to scribble (gdk_draw_pixbuf(widget->window, NULL, my_pixbuf...)). How much more obvious could it be?

Chris Seaton
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux