Hi Ales El sáb, 15-10-2005 a las 22:25 -0400, Ales Hvezda escribió: [snip] > I tried out your code changes. Very nice! I did compare > the output between libgdgeda and getting the pixbuf and there are some > visual differences (the libgdgeda is a little crisper), but I'm much > happier with the new mechanism.
Did you notice that the images are not 800x600 when selecting 800x600? This is because the code only outputs the relevant schematic, without the blank border that libgdgeda being in the libgdgeda output. > I did fix a couple bugs dealing with: > > * non-default images were not being rendered correctly (the was > some uninitialized data around the image edges). The fix was > to set some more variables in your toplevel copy. > > * I also added some code to convert the color pixbuf to greyscale > to support the image-color rc keyword. Thanks for the changes. I think that picture and PNG support are complete now. > Unrelated change: > > * I added code to gschem configure.ac to detect if gtk+ 2.6.x or > greater is installed. Could somebody who has gtk+ 2.8.x on their > machine please update from cvs and do the following: > > cat config.h | grep HAS_GTK26 > > and send me the output. This test is in prep for some future work > I am planning which requires gtk+ 2.6.x. Don't worry, gEDA/gaf > will still work build and run for gtk+ 2.2.x for a much longer > time. I would not use it this way. You can use GTK_MAJOR_VERSION and GTK_MINOR_VERSION which are defined by GTK. If you are using a widget available only from version 2.6, then you can write something like this: #if ((GTK_MAJOR_VERSION > 2) || \ ((GTK_MAJOR_VERSION == 2) && (GTK_MINOR_VERSION >= 6)) ) <code for GTK version 2.6> #endif In fact, I am using them in a file load/save window replacement (using the GTK file chooser), and they are working great. If you are curious, I have the new file chooser working, but I'm stuck again trying to get a preview of the file for the file chooser.... I think we really need some way to get a pixbuf from a toplevel structure _without_ defining or using a drawing_area (which needs to be visible) and totally unaware of windows or drawing_areas defined in w_current (something like: GdkPixbuf *get_pixbuf_from_toplevel(TOPLEVEL *w_current) )... Maybe I will be luckier any other day.... Cheers, Carlos