Drawing module - graphic features for Drupal

Last modified: May 9, 2009 - 11:52

The Drawing project consists of these packages:

  • The Drawing API module; this contains generic functions in order to parse canvas arrays in a similar way to Forms API.
  • The Drawing SVG toolkit, which contains the functions to process the canvas shapes and theme it into SVG output.
  • The Drawing GD toolkit (currently 6.x only), which contains the functions to process the canvas shapes and generate png, gif, and jpg images.
  • The Drawing Demo module; contains a few canvases to test out and study.
  • The Drawing Graph module; provides functions to easily create graphs.

The basic idea of the Drawing API is that developers can create a canvas builder function (analogous to a form builder function) which returns an array of canvas groups and shapes (similar to form elements). The canvas array can then be processed into an image with drawing_get_canvas('canvas_id'); where canvas_id is the name of the canvas builder function.

The Drawing API documentation below contains the syntax by which graphics can be created.

 
 

Drupal is a registered trademark of Dries Buytaert.