aplsimple | Login

The drawscreen.tcl allows to draw on the screen. It can be sourced or used stand-alone.

When sourced, drawscreen runs this way:

source drawscreen.tcl
::drawscreen::run wins ?events? ?-fill fill? ?-width width? ?-length length? ?-bell bell?


drawscreen provides "cget" and "configure" for options, e.g.:

::drawscreen::configure -fill red -width 20 -length 30
puts [::drawscreen::cget fill -width -length]
::drawscreen config fill blue width 30 length 40 -bell no
puts [::drawscreen cget -fill width length bell]

When stand-alone, drawscreen runs this way:

tclsh drawscreen.tcl ?events? ?-fill fill? ?-width width? ?-length length? ?-bell bell?


Control+X keys are used to start / end drawing. Then the left mouse button is used to drag-and-drop the mouse pointer.

To end with the drawing, the right / double click / Control+X is used.

In Windows, there is a short lag between Control+X and the bell signalizing drawscreen is ready to draw.

License: MIT.