Hello Christine,
for my project at university, I would like to expand your tool XCircuit. - I want to insert a XCircuit Bouton in which you have to create the functionality PNG file. (1. How can I create a Bouton in Xcircuit?) (2. How can I write a script file (or C code) that generates PNG?)
I usually do this (outside of xcircuit) using the ImageMagick tools. The command "convert" runs the ImageMagick conversion: convert test.ps test.png I'm not sure if ImageMagick has its own PostScript interpreter. It may use ghostscript. The Tcl/Tk interface makes it easy to add a button. For example, suppose you want to add to the File->Export menu. You can bring up the tkcon console with "File->Tcl Console". Then, at the Tcl prompt, type: .xcircuit.menubar.filebutton.filemenu.exportmenu add command \ -label "Export PNG" -command \ {set fname [page filename]; set froot [file rootname $fname]; \ exec convert $fname ${froot}.png} Now there is a menu button "File->Export->Export PNG". The Tk window hierarchy is defined in the script file lib/tcl/wrapper.tcl. in the xcircuit source directory. The statement to add the menu button can be put in the ".xcircuitrc" file in your home directory and it will appear every time you run XCircuit. This is a simple example, and has many limitations, such as using the original file on disk, not the current page view in xcircuit. And it hangs if no such file exists. But that is basically how it is done. Regards, Tim +--------------------------------+-------------------------------------+ | R. Timothy Edwards (Tim) | email: t...@opencircuitdesign.com | | Open Circuit Design | web: http://opencircuitdesign.com | | 22815 Timber Creek Lane | phone: (301) 528-5030 | | Clarksburg, MD 20871-4001 | cell: (240) 401-0616 | +--------------------------------+-------------------------------------+ _______________________________________________ Xcircuit-dev mailing list Xcircuit-dev@opencircuitdesign.com http://www.opencircuitdesign.com/mailman/listinfo/xcircuit-dev