[deepamehta-devel] July 8th next dm-dev meeting at Wikimedia
Malte Reißig
mre at deepamehta.de
Tue Jun 24 10:55:49 CEST 2014
On 24.06.2014 01:09, carolina wrote:
> The repo is:
>
> https://github.com/carolinagc/dm4-import-export/tree/export_toSVG
>
> The import/export plugin only works (for the moment) with default
> topics. The export to SVG is working though there are a couple of
> things to improve and right now I'm refactoring the code, so you won't
> find the export_toSVG on master but on its branch :)
>
> any suggestions, improvements, etc are welcome :)))
Nice.
Just, what do you mean with "default topics" - like just exporting the
TopicTypes coming with the DM Standard Distribution?
Since I remember my user-friend at the last developer meeting wanting a
Topicmap to Bitmap-Export, there might be an easy way we could integrate
this (maybe as an export option?) into this plugin, too, or?
The client-side source code for exporting to bitmap, as long as the
default canvas-based topicmap-renderer is used, should be easy as:
function convertCanvasToImage(canvas) {
var image = new Image();
image.src = canvas.toDataURL("image/png");
return image;
}
Source: http://davidwalsh.name/convert-canvas-image
While I guess that its quite straight-forwad to create a .PNG-File out
of a data-uri. At least I found a useful-looking comment in the php.net
community manual under
http://php.net/manual/en/function.base64-decode.php (currently the
second from top).
Tell me if we want to join these two export-options in your plugin.
Me personally, I am really looking forward trying out your SVG-Export
option and would be happy to test-drive file-compatibility with e.g.
Inkscape and give you feedback for consideration.
Nice greetings!
More information about the devel
mailing list