G.draw ()

Read(2417) 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. If both w and h are less than 1, use the resolution ratio of the current screen. The format of image returned is specified by an option, and the default one is an SVG image with the hyperlink.

Parameter:

G

Canvas

w

Width of canvas in pixels

h

Height of canvas in pixels

Option:

@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).