Redraw:
Filter:
redSys/Classes (extension) | Red > redTools

Redraw
ExtensionExtension

simple drawing with the mouse

Description

The GUI takes the following modifier keys…

shiftstraight line from last mouse position
altrectangle from last mouse position
ctrloval from last mouse position

(try to use alt and ctrl in combination with shift)

Class Methods

.new

Arguments:

bounds

A Rect that defines window size and position.

Instance Methods

.win

The window.

.mouse

Current mouse position as a Point.

.clear

Clears the drawing.

.close

Close the window if open.

.width

Set Pen stroke width.

.strokeColor

Set Pen stroke colour.

.background

Set drawing background colour.

Examples