[cairo] API proposal: Damage Tracking

Behdad Esfahbod behdad at behdad.org
Sun Dec 14 16:31:54 PST 2008


Bill Spitzak wrote:
> For hit detection I think it would be better to make a hit-detecting
> Cairo surface type, rather than adding any calls to all existing
> surfaces. You create such a surface, draw to it, then use
> surface-specific calls to find out what was hit.

That doesn't work.  Cairo's drawing depends on the surface details (because of
font hinting, etc).

> In my experience nobody cares about the alpha of what was drawn. They
> only want to know if the path or stroke hit a specific area, even if
> what was drawn was a transparent image. Programs are far more interested
> in the source x/y of a copied image that was hit, they can then (if they
> want) look at the image to figure out if it was a transparent pixel.

I don't think everyone agrees with you on this.

behdad


More information about the cairo mailing list