On May 1, 10:01 am, "Alex Holkner" <
alex.holk...@gmail.com> wrote:
> I'm not especially keen on it, to be honest. I know Richard likes
> these properties at least, though.
It seems a nice convenience to me, and could lead to less cluttered
code, encapsulation and all that. I'm curious: what argument would
you have against it, beyond preference?
> Be aware that your implementation above is incorrect, it doesn't take
> into account the image's anchor_x and anchor_y properties, the
> sprite's scale (and how are you going to deal with the sprite's
> rotation?).
I was assuming the bottom left corner, but as I look into it a bit
further, I see your point. Are anchor_x and anchor_y recent? Or have
I just been missing them?
In my defense, I'll point out that my above code is a test case, not
an implementation. No scale or rotation are set, so the test case
*might* pass, if the anchor is set at bottom left. :) But I'll admit I
hadn't taken those into account either. :( I haven't looked into how
rotation and scaling work, so perhaps the implementation wouldn't be
as simple as I had thought.
Thanks for your response. I will take a closer look at these things
when I have a chance, if not for a patch, at least for a subclass.
--David