How to test if a point is on a spline

432 views Asked by At

I'm writing a drawing application. I want to draw a 2d spline and then test if the user has clicked on it. I know that finding the distance from an arbitrary point to a spline is complicated, but I just want to know if I'm within a couple of pixels. Is there a straightforward way to do this?

If its relevant, I'm using Cairo via the Gtk2Hs library in Haskell.

0

There are 0 answers