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

Re: gEDA-user: Topics discussed at yesterday's Free Dog meeting (10.6.2005)



Hi Carlos,

[snip]
>sure it had a bug! I was so focused into getting embedding pictures
>working that I forgot to test to unembed them! :-(
>Ales, can you update CVS version with the changes? Thanks.
>

	Absolutely.  The next time I have my laptop on the 'net I'll 
check the minor fix in.

>As an aside note: I remember to see something in the Free Dog's meeting
>notes about some demo of the gschem's file open dialog using gtk
>widgets. Is there already any code for that?

	As Stuart pointed out, no, but I've been eying doing this for
quite some time.  The existing file dialog box is really really really
out of date.

>It's in relation with adding picture output support when exporting png.
>In order to do that I think it's better to use gtk functions to get a
>pixmap of the drawing area and then save it as a .png file. This way we
>can get rid of libgdgeda... (I think it's not used for anything more).
>It's like a preview picture of the schematic in memory, and this will be
>needed when using the file load/save gtk dialog...
>I made some tries to get a pixmap from the drawing area, but I was not
>quite succesfull. Anyone can give me a clue about how to do this?


	Ah, yes, in order to do this you need to look at the gdk routines
which render into pixbufs and drawables:

http://developer.gnome.org/doc/API/2.0/gdk/gdk-Pixbufs.html

More specifically you should look at:

http://developer.gnome.org/doc/API/2.0/gdk/gdk-Pixbufs.html#gdk-pixbuf-get-from-drawable

In libgeda/gschem the:

  GdkWindow *window;

and 

  GdkPixmap *backingstore;

are the primary drawables.  Once you get the data into a pixbuf, you can use:

http://developer.gnome.org/doc/API/2.0/gdk-pixbuf/gdk-pixbuf-file-saving.html

the various routines for saving pixbufs to files. 

I think that getting rid of libgdgeda is a great idea, but if we are going
to do that, we have to make sure we can do all the rendering without creating
a gui window etc... otherwise we are no better than the (my) existing (lame) 
implementation for creating pngs.  

								-Ales