-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support rotation/scale/flip for Actor #3
Comments
Original comment by Daniel Pope (Bitbucket: lordmauve, GitHub: lordmauve): I had it in mind that this would be a property, eg:
However this has the drawback of needing an implied order for the transform. Maybe it could be CSS3 transform style?:
|
+1 My son asked me how to flip the alien image (to move it in the opposite direction), and the only solution I found (in addition to pre-creation of flipping image in an image editor) is: from pygame.transform import flip
def draw():
if direction > 0:
alien.draw()
else:
screen.blit(flip(alien._surf, True, False), alien.topleft) It would be nice to get it in a simpler way out of the box. |
@a96tudor has been working on scale/flip at the recent Europython sprints. The proposed API is to set |
Exactly. Currently he uses |
Originally reported by: Daniel Pope (Bitbucket: lordmauve, GitHub: lordmauve)
Pygame supports somewhat slow rotation, scale and flip operations in software.
We should expose these for the Actor class.
May depend on issue #2, which allows users to specify an "anchor point" around which the actor will rotate.
Open questions: how should these operations affect the actor's bounding rect?
The text was updated successfully, but these errors were encountered: