Hello. I cannot address the issue of widgets. Anyway GIMP does not use widgets to display individual layers, only the final composition, app/display holds the code IIRC(quite a bit of code -- someone else might be able to narrow it down further.). The image is composited and THEN displayed (in one widget). With this sort of display there really is no reason to try to be clever by doing things as confusing as you described. You just need to do the composition (GDK will help you with that) and display the relevant area of it in an expose handler for your display widget. In short, this reminds me of when I used to make more work for myself by being clever about finding ways to reduce the work I needed to do. Do things the plain way first, try to be clever later if it doesn't work well enough, OK? On Mon, Mar 31, 2008 at 10:23 PM, Gregory Hosler <ghosler@xxxxxxxxxx> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi all, > > I'm working on a gtk application, and I have a need to display a composite image. i.e. a > base image, with a 2nd (much smaller) image overlaying a part of the bigger 1st image. > Periodically I may need to move the smaller image to a different location within the > bigger image. > > My first attempt was to use the GtkFixed widget, and put both images into the GtkFixed > container. The problem I faced is that GtkFixed will always layer the larger image on top > of the smaller image (at least this is my observation, and I cannot figure out how to > control the layering order for GtkFixed). > > In [minimal] playing around with Gimp, I am aware that Gimp has the ability to create a > composite image, out of multiple layers. I'm kinda curious as to the algorithms (pointers > to within the code welcome), and whether there are widgets that are more suited to this, > rather than the GtkFixed (that I could not get to work for me). > > I do not mind loading a pixbuf, and then replacing a designated section of it with the > smaller image's pixbuf, if that is what it takes... I cannot figure out from the gtk > pixbuf devhelp pages how I might achieve this though. > > Any thoughts/comments are most welcome. > > Thanks, and best rgds, > > - -Greg > > - -- > +---------------------------------------------------------------------+ > > Please also check the log file at "/dev/null" for additional information. > (from /var/log/Xorg.setup.log) > > | Greg Hosler ghosler@xxxxxxxxxx | > +---------------------------------------------------------------------+ > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (GNU/Linux) > > iD8DBQFH8NCq404fl/0CV/QRAnelAJ42K0vVFIy/4g6u1CCQGTdu+v2buwCbBpIZ > 8xUITPrCcFIJqPbMpCu98Ew= > =lmCC > -----END PGP SIGNATURE----- > _______________________________________________ > Gimp-developer mailing list > Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx > https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer > _______________________________________________ Gimp-developer mailing list Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer