SQLEditor, SVG and Cocoa

One of the new features in the latest SQLEditor 2.1 beta release  (v2.1.0b2, about 5.7MB) is SVG export. This allows you to create a diagram in SQLEditor and then export it to SVG format.

SVG format is a vector diagram format that can be rendered by many web browsers or edited in vector drawing programs like Inkscape.

Here is an embedded svg file:

viewbox

 

The neat thing is that if the image gets scaled it should scale fairly cleanly.
(The lines get a bit fuzzy due to the anti-aliasing)

viewbox

 

Click on the image and you should see the file displayed full size (no separate preview image!)

This should work in Chrome, Safari and Firefox. There are currently some issues with Opera which doesn’t draw the text. I think this is an error in the SQLEditor export code somewhere because I have some early test versions that do work in Opera.

I haven’t tested this with Internet Explorer, but SVG is apparently supported in v9.

I’m still fine tuning the details on this, the examples on this page were tweaked to include a defined view port so that they clip properly and don’t include a lot of white space. This should get done during the export in the next release.

I’m hoping to write another post about how SQLEditor is doing this, it proved to be fairly easy, except for the difficult bits.

 

This entry was posted in SQLEditor. Bookmark the permalink.

Leave a Reply