[cairo] Extents under rotation

Donn donn.ingle at gmail.com
Thu Dec 5 22:32:56 PST 2013

On 05/12/2013 22:43, Uli Schlachter wrote:
> Pong
! :D

> Depends on what you mean with "should". ..which means that "smaller
> results would still be correct"
Yes - smaller is better. However, since I'm using the bbox for clipping 
.. I suppose a larger area makes no difference.

> Cairo calculates the tight extents in device space, that is without
> any rotation. Then it has to account for the rotation that is used.
> To do this, it assumes that the path really is a rectangle that
> completely covers the extents of the path in device space and returns
> the corresponding bounds for this in user space. This rotation
> introduces the too-large-values that you are seeing.
Ah, I can just about picture it now. Thanks for the translation.

> good input for how to calculate the values that you want. My bad
> input would be an ugly wall of code, I guess.
If your ugly wall works, I might grok something from it, or at least,
hack a tighter bbox out of it.

Really appreciate your time in replying, thanks!

A question - will this mysterious rotational uncertainty principle (lol) 
return in situations like in_fill() ? I'd want to test my mouse against 
some path that is under a tree of matrix influences.


More information about the cairo mailing list