{"id":939,"date":"2013-04-16T15:28:20","date_gmt":"2013-04-16T14:28:20","guid":{"rendered":"http:\/\/www.malcolmhardie.com\/weblogs\/angus\/?p=939"},"modified":"2025-02-01T03:04:14","modified_gmt":"2025-02-01T03:04:14","slug":"sqleditor-svg-and-cocoa","status":"publish","type":"post","link":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/2013\/04\/16\/sqleditor-svg-and-cocoa\/","title":{"rendered":"SQLEditor, SVG and Cocoa"},"content":{"rendered":"<p>One of the new features in the latest <a href=\"http:\/\/www.malcolmhardie.com\/sqleditor\/releases\/2.1.0b2\/SQLEditor-2-1-0b2.zip\">SQLEditor 2.1 beta release<\/a>\u00c2\u00a0\u00c2\u00a0(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.<\/p>\n<p>SVG format is a vector diagram format that can be rendered by many web browsers or edited in vector drawing programs like Inkscape.<\/p>\n<p>Here is an embedded svg file:<\/p>\n<p><a href=\"http:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-content\/uploads\/2013\/04\/viewbox.svg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-942\" alt=\"viewbox\" src=\"http:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-content\/uploads\/2013\/04\/viewbox.svg\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>The neat thing is that if the image gets scaled it should scale fairly cleanly.<br \/>\n(The lines get a bit fuzzy due to the anti-aliasing)<\/p>\n<p><a href=\"http:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-content\/uploads\/2013\/04\/viewbox.svg\"><img loading=\"lazy\" decoding=\"async\" alt=\"viewbox\" src=\"http:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-content\/uploads\/2013\/04\/viewbox.svg\" width=\"304\" height=\"92\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Click on the image and you should see the file displayed full size (no separate preview image!)<\/p>\n<p>This should work in Chrome, Safari and Firefox. There are currently some issues with Opera which doesn&#8217;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.<\/p>\n<p>I haven&#8217;t tested this with Internet Explorer, but SVG is apparently supported in v9.<\/p>\n<p>I&#8217;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&#8217;t include a lot of white space. This should get done during the export in the next release.<\/p>\n<p>I&#8217;m hoping to write another post about how SQLEditor is doing this, it proved to be fairly easy, except for the difficult bits.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the new features in the latest SQLEditor 2.1 beta release\u00c2\u00a0\u00c2\u00a0(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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-939","post","type-post","status-publish","format-standard","hentry","category-sqleditor"],"_links":{"self":[{"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/posts\/939","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/comments?post=939"}],"version-history":[{"count":1,"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/posts\/939\/revisions"}],"predecessor-version":[{"id":1311,"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/posts\/939\/revisions\/1311"}],"wp:attachment":[{"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/media?parent=939"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/categories?post=939"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.malcolmhardie.com\/weblogs\/angus\/wp-json\/wp\/v2\/tags?post=939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}