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/92811c7e-5ca4-4063-a03c-dec9fe2f972f%40googlegroups.com.

Reply via email to