[cairo] Hit detect surface?

Bill Spitzak spitzak at d2.com
Wed Mar 1 17:29:24 PST 2006

Behdad Esfahbod wrote:

> Doesn't the distance_to_stroke/fill solve this already?  You just
> find the nearest object and that tells you exactly what's the
> maximum radius of a circle that hits only one object?

The purpose of a hit-detect surface is to see if some arbitrary Cairo 
code (perhaps in a virtual function of a draw object belonging to a 
canvas) is near the cursor without having to rewrite it.

Also it may be useful for detecting transparency in images, glyphs, or 
dash patterns (though these could also all be considered bugs in the hit 
detect surface, too...)

More information about the cairo mailing list