Community Documentation

Drawing module - graphic features for Drupal

Last updated May 9, 2009. Created by LeeHunter on July 23, 2007.
Edited by danielb, snufkin, add1sun, dmitrig01. Log in to edit this page.

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.

About this page

Drupal version
Drupal 5.x, Drupal 6.x
Audience
Programmers

Develop for Drupal

Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here