[pygtk] Advice for Debugging Coordinate Translation (my own and cairo's)

Jamie Bliss astronouth7303 at gmail.com
Sat Sep 10 23:07:10 WST 2011


On Sat, Sep 10, 2011 at 6:21 AM, Pietro Battiston <me at pietrobattiston.it> wrote:
> I just gave a very brief look at your code, and have a very brief
> suggestion: have you considered using directly Cairo matrix objects to
> manage coordinates changes?

I didn't know that existed. That's a pretty good idea. Probably faster
than my existing stuff, too.

> That's what I did - notice my problem was sligthly different from yours,
> and that code is probably in non-working state - for instance here:
>
> git clone git://pietrobattiston.it/spilla
>
> (if I remember correctly, for instance "transform_point" used in
> spillamod/operations.py) and it was very useful - I can always make
> drawing bugs, but once I draw, I know clicks are in sync with the
> drawing.

That's the important thing, IMHO. I care less about if the drawing is
correct than that the transformations are consistent in both
directions.

Better informed,
Jamie


More information about the pygtk mailing list