visual editor

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

visual editor

sindroide
Hello everyone ... is there any visual editor so I can draw lines with the mouse on a canvas and then i get autogenerated code?

thanks for your answer , sorry for my ignorance, i've been searching about this without success
Reply | Threaded
Open this post in threaded view
|

Re: visual editor

gouessej
Administrator
Hi

Can you be more precise? Are you looking for a visual editor for GUI? In this case, Matisse (in Netbeans) and Window Builder (in Eclipse) might be interesting for you.

On the other hand, if you're rather looking for a canvas producing JOGL primitives from things drawn in a canvas, you will have to make it. You can use some parts of my source code (if you agree with the terms of the license), I have a plain AWT canvas that I modified to draw and save images, you can modify it in order to use the stored pixels to generate JOGL code, I use it in JFPSM. Best regards.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: visual editor

sindroide
thanks a lot gouessej, i'll take a look at your AWT canvas.

do you know how can I load dxf (or any vector image type) to a jogl canvas? so I can rotate it for example...
I also been searching about this, and didn't find anything precise .. some talk about a self coding loader ...

I heard that it's not big deal with opentk for C#
Reply | Threaded
Open this post in threaded view
|

Re: visual editor

gouessej
Administrator
You can use the library Ycad to load DXF files:
http://sourceforge.net/projects/ycad/

Then, you can replace AWT Graphics by this to draw the content with JOGL:
https://github.com/brandonborkholder/glg2d

OpenTk C# binding for the OpenGL API is slower than JOGL.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: visual editor

sindroide
thanks again gouessej, I'm sure those libraries can help me a lot, but regarding to glg2d I didn't find any guide to use it.

I'm grateful if you drop some lines of how can a read a dxf file and put it into jogl. Just a little example please!
Reply | Threaded
Open this post in threaded view
|

Re: visual editor

Brandon Borkholder
I'm grateful if you drop some lines of how can a read a dxf file and put it into jogl. Just a little example please!

The simplest example is

JFrame frame = new JFrame();
frame.setContentPane(new G2DGLPanel(new YcadvPane()));

You just need to wrap the panel you want to render in a G2DGLPanel and then add the G2DGLPanel to a frame or window.

Note that the version 0.1 of glg2d (which is the only stable branch so far) uses JOGL 1.x.

sindroide, I sent you an email.  Feel free to follow up with me directly and we can discuss glg2d specifics.