[racket] plot pixel position

From: Neil Toronto (neil.toronto at gmail.com)
Date: Wed Apr 16 12:09:49 EDT 2014

On 04/15/2014 12:59 PM, David Vanderson wrote:
>
> Is there a way to access area's plot->dc?  For this example I wanted to
> ask if the mouse was within 2 pixels of any point.

There's unfortunately not. But if your plots don't have axis transforms 
(i.e. have the identity transform), it's a linear function, so you can 
apply dc->plot to two points and derive it from the return values.

Neil ⊥


Posted on the users mailing list.