[cairo] Coordinate from device to user space without a context
donn.ingle at gmail.com
Fri Nov 8 00:15:09 PST 2013
On 07/11/2013 20:22, Bryce W. Harrington wrote:
> If I were you I'd probably start afresh with just
> the formulas I gave you, and make a little toy app that *just* does the
> mouse -> userspace conversion, without any other matrix calls.
Bryce, I spend some time making a toy app as you suggested. It's giving
confusing results, but I hope it will help the list help me! Attached.
On my system I compile it with:
valac --pkg cairo -X -w mailing_list_matrix_testbed.vala -o test
./test yes #will do the cersion with the formulas
./test #will use device_to_user
then view the output png:
It's confusing because *both* versions do the same wrong thing! I was
not expecting that. The odd oscillation in the numbers is at work.
> Btw, when you make cr.translate(), cr.rotate(), and cr.scale() calls,
> those are really just helper routines for modifying the internal
> matrix. So be aware of those too.
Thanks, I will dispense with these calls in favour of a direct
set_matrix in the future, when I can tell the trees from the woods.
Thanks for all the patience so far, I worry that I'm not comprehending
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2409 bytes
Desc: not available
More information about the cairo