Drawing module release

snufkin's picture

Its not time for the next weekly progress report yet, but in the past days finally i managed to progress far enough to have a development snapshot release, so I wanted to inform those interested in the project.

I wanted to wait with a release until I have a semi-solid API, so you won't see deep alterations afterwards. I will put together a handbook page about the module, the API soon. Check out a demonstration! What you see on the demonstration page is a big Druplicon built in SVG (provided your browser supports SVG). What is behind is a structured array, consisting of the two supported path methods, assembling the final picture. For code level explanation a document is to be written soon.

Only local images are allowed.The drawing API uses drupal_render() and its own theme functions to render the structured array containing the geometries into SVG syntax. The following features have been implemented to this date:

  • complete basic shape support (ellipse, rectangle, line, polyline, polygon) (ok circle still missing)
  • grouping element support (, including transformations (translation, rotation) for groups!)
  • direct styling support via the API (fill, stroke, stroke-width), css styling coming soon
  • basic text support
  • path support (explicit path declaration, by insering the d="" values directly, and imlicit path declaration, via structured array)

The module contains a module named druplicon, just to separate the example code from the main module. More code cleanup, and additional features will be coded during the week.


Hi, In FF2 I get the Icon

amitaibu's picture

In FF2 I get the Icon pretty big. In IE7 I get an error... Damn microsoft ;)


then its working perfectly

snufkin's picture

Thanks for checking :)

There is a more or less complete list of supported and unsupported browsers on the project page (http://drupal.org/project/drawing). All the modern browsers (ff2, opera9, safari3) support SVG, except for IE7. I will try a solution that indicates this for IE users, and offers to download the plugin, but I cant promise anything. I need to get a machine with windows + IE7 first (not to mention to finish the functionality part of the module).