REBOL 3 Docs Guide Concepts Functions Datatypes Errors
  TOC < Back Next >   Updated: 3-Aug-2010 Edit History  

REBOL 3 Functions: draw

Description

The draw function renders a scalable vector graphics drawing into an image buffer. It allows draw commands to be created without needing a gob! and the to-image function. With it, users can easily prebuild vector graphics, and if the image is static, it is more efficient too (because the vector graphics are regenerated each time the gob! is refreshed).

The function can take an existing image and draw on top of it or create a new image of a given size.

This example draws into an existing image:

image: draw logo [box 20x20 40x40]

This example creates a new image of the given size and draws into it:

image: draw 300x300 [box 20x20 40x40 line 0x0 300x300]

Transparency is supported. The resulting image will use the alpha channel.

To read about the all the commands in the DRAW dialect, see here.


  TOC < Back Next > REBOL.com - WIP Wiki Feedback Admin