Hello,
What would be the best cross-platform GUI library to use for a vector
based CAD program ( something like Visio on Windows ) WxWidgets,
Tk, PyQt, Java Swing, Java SWT,???? I need the capibility to
draw and edit in a window that looks like a page of paper so WYSIWYG
is very important, and I need to save the drawings in vector based
file formats like PS, EPS, SVG, as well as image formats like jpg,
png, and gif. Also, the images need to be high resolution so that
they can be pasted into various other programs in Windows OS, and
Linux OS, and the Mac OS. Scripting is also a requirement.
Thanks in advance,
Dan
Jeff Higgins - 20 Aug 2007 17:18 GMT
> Hello,
<http://www.rentacoder.com/RentACoder/default.asp>
chewie54 - 21 Aug 2007 17:58 GMT
> > Hello,
>
> <http://www.rentacoder.com/RentACoder/default.asp>
This is for a startup company with no cash for hiring outside help.
I was just looking for opinions from experience users of with some of
these GUI libs.
Java/SWT
Java/Swing
Tcl/Tk
Python with Cairo ( PyGTK )
Python/Java with Qt
Python with wxWdigets
C++ with wxWidgets
Thanks again for any help in advance,
Roedy Green - 22 Aug 2007 03:35 GMT
>What would be the best cross-platform GUI library to use for a vector
>based CAD program ( something like Visio on Windows ) WxWidgets,
>Tk, PyQt, Java Swing, Java SWT,????
Normally you would use Swing unless you had some pressing need for
something else. SWT is a stripped down Swing you would use in
conjunction with Jet when you need high speed, but you are willing to
give up platform independence.
Swing is the only one you will get much help with on newsgroups.
AWT is used when you want to support ancient browsers with ancient
Javas.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
chewie54 - 22 Aug 2007 14:19 GMT
On Aug 21, 10:35 pm, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> >What would be the best cross-platform GUI library to use for a vector
> >based CAD program ( something like Visio on Windows ) WxWidgets,
[quoted text clipped - 12 lines]
> Roedy Green Canadian Mind Products
> The Java Glossaryhttp://mindprod.com
Ok, thanks. I actually have the application partially done using
Java/Swing but I'm not sure if I can save to the drawings done with
Java2D to SVG, PDF, and PS, and make high resolution images (PNG,
GIF, JPG),
and also produce WYSIWYG printer outputs?
How accurate is the screen DPI java2D draws compared to the higher DPI
resolutions of printers? Will I be able to get WYSIWYG results for
images, vector drawings, and printer outputs?
Thanks,
Dan
Roedy Green - 23 Aug 2007 03:26 GMT
>Ok, thanks. I actually have the application partially done using
>Java/Swing but I'm not sure if I can save to the drawings done with
>Java2D to SVG, PDF, and PS, and make high resolution images (PNG,
>GIF, JPG),
>and also produce WYSIWYG printer outputs?
things to check out:
http://mindprod.com/jgloss/gifencoder.html
http://mindprod.com/jgloss/jpgencoder.html
http://mindprod.com/jgloss/printing.html
http://mindprod.com/jgloss/jai.html
to get PostScript I think your best bet would be to use a PostScript
printer driver and write to a file. The PS is going to be pretty ugly
compared with what you would generate directly.
SVG I don't know about. What you might try there is converting
captured printer metafile output if you can't find a more direct
solution.
The approach I would use is to create some high level drawing tools
that are basically just wrappers for some subset of the Sun drawing
tools, and do my drawing with them. Then I could slip in
implementations that emit clean SVG and PS, using a custom PS prelude
to keep the code terse and readable. I prefer that approach since it
is 100% under my control, and the code won't stop working if something
inside Java or metafiles changes.
The only really tricky part then is converting images to PS image
format and compressing them. You might dig around in
http://mindprod.com/jgloss/ps.html
or http://mindprod.com/jgloss/pdf.html
for tools to handle that.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Thomas Kellerer - 23 Aug 2007 07:53 GMT
chewie54 wrote on 20.08.2007 17:45:
> Hello,
>
[quoted text clipped - 7 lines]
> they can be pasted into various other programs in Windows OS, and
> Linux OS, and the Mac OS. Scripting is also a requirement.
There are a lot of graphing libraries out there.
The NetBeans platform has a graphing library that integrates with their
framework (http://graph.netbeans.org). So if you are planning to base your
application on the NetBeans platform that would probably be the first choice.
The Eclipse RCP framework as a similar thing (GEF, I believe)
If you are not using one those platforms, there are some "stand-alone" libraries
out there.
I have never used one of those (the project where I intended to use one did not
happen), but some of them look quite good:
http://www.jgraph.com/jgraph.html (commercial and GPL version)
http://www.yworks.com/en/index.html
http://jgrapht.sourceforge.net/
You are the only one to decide which of them is the right one for your job.
JGraph has a pretty impressing list of applications using it.
Thomas