Scripting the Paint Tool
Rob Cozens
rcozens at pon.net
Wed May 24 02:20:43 EDT 2006
Hi All,
I'm trying to use the pencil tool to emulate TPC ink input. (Adding a
signature to an eForm.)
My requirement is simple: open an area on the screen and capture the
pencil "script".
According to the Rev Dictionary, this should be easy:
"When using the pencil tool, the cursor is a pencil shape (over images)
or an arrow (elsewhere). This tool is used to draw the penColor onto
an image.
If you try to paint with the pencil on a card that has no images, an
image the size of the card is created to hold the painting. If the
current card already has one or more images, painting outside the image
has no effect."
So I create an empty image on the card (in a group) and a button
labeled "Sign" which chooses the pencil.
#1: Once the pencil tool is chosen it never turns to an arrow while
inside the card.
#2: RR doesn't seem to know my empty image is there and creates a card
sized image when there are no other images on the card.
#3: I added a gif image to the card, and it seems that I can now only
write on that image; but the cursor still remains a pencil when it's
not over an image.
Since the cursor remains pencil, I can't deactivate the cursor by
clicking on the button meant to return to the browse tool.
I'd appreciate any light anyone could shed on this. Is the problem
that my image is empty?, Transparent (?), in a group?
How do I get the arrow cursor to appear?
Rob Cozens
CCW, Serendipity Software Company
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the use-livecode
mailing list