Hello!

I wouldn't say the solution is not implemented, or omitted for any 
performance reasons. It was probably just expected that the user would 
solve it in the way you did it. However, I agree that adding helper 
functions could still be useful and probably worth a PR. 

Such a function should probably be added to ImageGrids as well, since it 
also handles a group of images.

Also the Discord is more active than this group, so it might be easier to 
ask questions there in the future. :)

On Tuesday, November 26, 2019 at 1:54:18 PM UTC-6, Sam Henderson wrote:
>
> Hey everyone, learning lots developing functions and code for a game I'm 
> making using pyglet. First posting in this email group and I am genuinely 
> curious as to the answer for this question. Not sure if the solution has 
> not been implemented because no-one has got around to doing so, or if there 
> are technical/efficiency reasons for leaving it out. I will gladly help to 
> start expanding pyglet on github but think I need a question like this 
> answered for I tackle that.
>
> Issue: I want to change the anchor point of an entire pyglet.animation. 
> Right now I have a separate function created to do this (see below). Can 
> this function be added to pyglet.image.Animation so that anyone else 
> looking for this solution just has to called set_anchor ? Obviously the 
> format of the function can be cleaned up.
>
>
> def set_anchor(self, anim: pyglet.image.Animation, anchor_x=0, anchor_y=0):
>     """Set anchor points for animation. Anchor point is set for each 
> individual frame image."""
>     for f in anim.frames:
>         f.image.anchor_x = anchor_x
>         f.image.anchor_y = anchor_y
>
>
>
>
> Thank you,
> Sam Henderson
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyglet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyglet-users/d48f7556-75a1-4ced-a0ef-f9e1004c7e6d%40googlegroups.com.

Reply via email to