Message Boards Message Boards

0
|
4028 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Unexplained ClickPane Behaviour

Posted 9 years ago
Attachments:
POSTED BY: Andrew Macafee
3 Replies
Posted 9 years ago
Attachments:
POSTED BY: Andrew Macafee

You might complain (understandably) that the documentation says you don't have to stick to Graphics. If that's the case, we should try to debug what is going on with the clickpane. Let's make it show a list of the points.

DynamicModule[{pts = {{-20, -20}, {0, 0}, {20, 20}}},
{Dynamic[pts], 
  ClickPane[AnImg[Dynamic[pts]], AppendTo[pts, #] &]}]

Do ahead and click inside this. you can see that it's registering points.

But the points are at huge values like {165, 54}! The reason is that Image has a coordinate system meant for Images. The 165th by 54th pixel of that image is located at {165,54}. That point doesn't appear in the composed image.

POSTED BY: Sean Clarke
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract