[cairo] Coordinate from device to user space without a context

Donn Ingle donn.ingle at gmail.com
Thu Nov 7 17:36:16 CET 2013


Perhaps someone can give a short cairo/gtk program (in c or vala) that
demonstrates the use of that formula (and/or the invert thing) - that
would embiggen grokkage. :D

/d

On 7 November 2013 16:24, Donn <donn.ingle at gmail.com> wrote:
> On 07/11/2013 15:48, ed44 wrote:
>>>
>>> So, x = [18,53,17,51] See the jumps?
>>
>>
>> Yes , i see.
>> But if you use the above formula and the matrix values are constant
>> there should not be any jumps.
>
>
> I'm not seeing the bug.
> 1. The matrix does change because it has to. It comes from a translate(x,y)
> [line 120], then gets saved into mymatrix [line 126],
> 2. then the move() method causes x,y to shift to mousex,y [called from line
> 39. The method at line 58]
> 3. Then a queue_draw() happens [line 420]
> 4. In draw(), a call to set_matrix(cr) happens [e.g. line 305],
> 5. which is back to 1 were the latest x,y is used.
>
> Look, both you and Bryce tell me that formula should work as expected, so
> I'm happy to think there's a bug in my code. I just gotta find it!
>
> Thanks for your time,
> \d
> (code attached this time.)
>
>


More information about the cairo mailing list