[Cairo] mouse pointer and cairo

Thomas Hunger info at teh-web.de
Mon Oct 13 16:43:01 PDT 2003


> 1. Make the "number" reliably hold a void* pointer, not just an integer.
Would this need a new backend?

> 2. Return how opaque the object is. Programs can use this to decide if the 
> user was clicking through an almost-transparent window on the foreground 
> object. More importantly, transparent areas of images and letters can return 
> but the program can skip them if it wants.
I did not think about it before, but exact text-selection seems important to 
me. The only way to do it geometrically correct would be decomposition?

> 3. Somehow return a distance value. This should be the distance between the 
> center of the pixel from the nearest line or vertex (squared to avoid the 
> need for sqrt). Make it negative if the pixel is inside the a filled shape. 
Why is the distance important? Either one selects a shape, or one does not. A 
certain  unexactness could be introduced by a larger "hit area".

The most important use-case for intersections I can think of is a 
user-interface for some vector operations, maybe some collision detection in 
a game. CAD and stuff probably calculates intersections between lines and 
shapes itself. But my fantasy is quite limited.

Tom





More information about the cairo mailing list