[Cairo] mouse pointer and cairo

Thomas Hunger info at teh-web.de
Sat Oct 11 14:39:10 PDT 2003


Hi,
I wonder what would be the best way to calculate the intersection between my 
mouse pointer and a cairo-shape (line, rect).
The only way I can think of is to tesselate into trapezoids by calling 
cairo_stroke or cairo_fill, then take the list of trapezoids and look for 
each if the pointer is inside and return true if it was inside any trapezoid.
But then functions like _cairo_path_stroke_to_traps are hidden inside, so I 
would need to hack the insides of cairo?
Is cairo thought to be for things like this, too, or is it a pure rendering 
interface?

Tom





More information about the cairo mailing list