4 recognize \- character recognition
8 .ta 4n +4n +4n +4n +4n +4n +4n +4n +4n +4n
14 Scribble *scribblealloc(void);
15 Rune recognize(Scribble *);
19 The scribble library implements simple character recognition.
20 All characters are drawn using a single stroke of the pen (mouse button 1)
21 as on a palmtop computer.
23 The library is not really intended for standalone use. Its primary
24 use is by the scribble graphical control (see
28 allocates and returns an appropriately initialized
33 .ta 4n +4n +4n +4n +4n +4n +4n +4n +4n +4n
36 #define CS_PUNCTUATION 2
52 This structure encodes the points making up the stroke
53 to be recognized, as well as the \f2character group\fP in which
54 the stroke should be searched.
56 There are three such groups:
61 The current group is encoded in the
66 Special strokes are recognized to switch between groups.
67 In addition, the charater recognized is influenced by
69 parameters and modifies them.
70 These are identified by the
81 is non-zero, the character is recognized in the punctuation
84 when the character recognized is printable and
86 is set, the associated control character is returned as if the
87 control key were depressed,
88 and when the character is a letter and
92 is set, the upper-case version is returned.
98 once a character has been recognized; the others are left set.
100 The character to be recognized is encoded as an array of pen_points in the
103 To allow easy drawing of the stroke as it is drawn,
108 fields are available to the application code for storing an array
109 of points for a call to
115 recognizes the character provided in the
120 returns the rune or zero if nothing was recognized.
122 .B /sys/lib/scribble/classifiers
123 contains the stroke definitions.
125 .B /sys/src/libscribble
127 This library is adapted from software reproduced by permission:
135 Copyright © 1999 Keith Packard
137 Permission to use, copy, modify, distribute, and sell this software and its
138 documentation for any purpose is hereby granted without fee, provided that
139 the above copyright notice appear in all copies and that both that
140 copyright notice and this permission notice appear in supporting
141 documentation, and that the name of Keith Packard not be used in
142 advertising or publicity pertaining to distribution of the software without
143 specific, written prior permission. Keith Packard makes no
144 representations about the suitability of this software for any purpose. It
145 is provided "as is" without express or implied warranty.
147 Portions of the software Copyright © 1994 by Sun Microsystems Computer Company.
149 Portions of the software Copyright © 2000 by Compaq Computer Corporation.