[cairo] Hit detect surface?

Christof Petig christof at petig-baender.de
Wed Mar 1 08:26:48 PST 2006

David Trallero Mena wrote:
> I also have needed to do that. In fact I think complicating cairo is
> unnecessary. I just create another surface of 32 bits-per-color and
> render everything again there. This new surface I use I refer to as
> select surface (hit-surface for you). The color used when re-rendering
> is indeed and ID (I have to talk with cairo guys about this) of the
> figure (rectangle, ellipse, circle...) that was rendered on the
> "original-surface".

IIRC the cairo developers still look for a sane reason to provide a
surface which does not antialias. If indead this is the best way to
implement hit detection, we have a case where antialiasing is a really
bad idea (also interpreting one part of the color as the opacity is a
bad idea).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060301/976e6b87/signature.pgp

More information about the cairo mailing list