Penpad is a small widget for free-hand drawing.Penpad provides an interactive control (widget) for simple drawing tasks.With this control, users can draw their scribble, as well as make a signature (autograph) for document exchange.Penpad is just a simple widget that needs to be integrated with a toolbar or other interactive controls in a complete application.
package require Penpad penpad .penbox pack .penboxThere are few other (optional) commands you can use for customizing the penpad (read below).
# change the look .penbox configure -pencolor white -bg black # save your drawings on a file (a .gif) .penbox export mywork.gif # clean your penpad .penbox cleanFor full details, read the "Penpad Reference"  within the doc directory.
Wish list (need help)
- provide a floating menu/toolbar for common/useful (?) operations.
- add cut&paste integrated with clipboard (Desktop-clipboard, not TK-clipboard) (available in 1.1 - Windows only)
- add more custom good-looking cursors.
- "Easy way" for adding a background image. (available in 1.1)
- Calligraphy !!!
WJP If you are REALLY ambitious you could add to the wish list:
- command to recognize characters and export as string.
Alex Caldwell Nice widget! Could be very useful. I modified Handwriting Word Recognizer after reading your comment above. Now you can have a discontinuous pen stroke, which allows dotting an "i" or crossing a "t". I had to change the bindings to detect when the pen is lifted off vs. pressed on the canvas. So it's not quite as fast, since you now have to click the "Recog" button to trigger recognition when you are done with your stroke. In the original version, the recognition would be triggered automatically when you lifted the pen off the canvas.I tried the STIHRS application above. I actually think Handwriting Word Recognizer is just about as good and doesn't look like the training takes any more time. Maybe it's recognition algorithms might be applicable to your project. It's all pure Tcl code, so should be easy to integrate and platform neutral. I didn't download the source for STIHRS - I'm not sure what language is used in the programming, but looks like it might be Windows specific.Fabricio Rocha - 17 Mar 2010 - You Tclers are DA MASTERS! I never knew about this package until seeing it in the Recent Changes page. Last weekend I saw in a computer store a rebranded version of the LaPazz D-Note DLA401 digital notepad. Really amazing thingie, I was tempted in buying one, but kinda deceived because it's software is Windows-only and its OCR is a shareware. "Once again. Bloody hell. What if they could do software for this in Tcl?", I thought, still considering that it would be hard or impossible to have OCR in Tcl/Tk...
ABU 2-nov-2006Penpad 1.1 is available
- snapshot to file (export) now discards any widget border.
- copy to clipboard (only on Windows; on other platforms this feature is ignored).
- import a "penpad" background from a graphic file or from the clipboard (import for clipboard works only on Windows)
- full support for scrollregion.
- ability to disable/enable the pen-tracing.
ABU 8-aug-2007Penpad 1.2 is available
- filenames with spaces are now correctly handled.
- added -transparency option to export method
- changed license (less restrictive)