G .draw()

Read(245) Label: draw, canvas,

Description:

Draw a canvas.

Syntax:

G.draw(w,h)

Note:

The function draws a w(width) * h (height) canvas and calculates the hyperlink string. The format of image returned is specified by an option, and the default one is an SVG image with the hyperlink.

Parameters:

G

Canvas

w

Width of canvas in pixels

h

Height of canvas in pixels

Options:

@j

Return a JPG canvas

@g

Return a GIF canvas

@p

Return a PNG canvas

Return value:

A completed canvas

Example:

 a.draw@p(600,600)

Return a PNG canvas of 600 x 600 pixels (witdth x height)