CanvasClickScript
protoDrawTool:
CanvasClickScript(unit)
Called when user taps in the canvas and your tool is selected.
DISCUSSION
- unit
- Stroke unit passed to this method by the recognition system. For information on stroke units, see Chapter 9, "Recognition," in Newton Programmer's Guide.
- return value
- Your must return one of the following values:
true
Tool has handled click completely.
nil
Tool has failed, click will turn into tap or highlight.
'continue
Tool wants default shape creation behavior. That is, tapping or dragging out a shape. All of the tool methods (such as*MakeObject
, *AdjustBounds
, etc.) are called normally.graphicalObject Tool has created a graphical object to be added to the canvas. This object should be of the same type as returned by the tool's
*MakeObject
method.
This function is intended to provide additional control over the creation of shapes.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help