-
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
Allow assignment to Actor's width and height to scale the Actor #36
Comments
Working on this. |
yes, that's the biggest stepping stone i've encountered until now, while thinking about the migration path from scratch to pygame zero... is any action (testing, ...) needed for this patch being added to the master? |
When I last looked, the patch had some issues causing the |
thanks! |
any update? |
setting |
I submitted a pull request that may mitigate this issue. It doesn't let the user choose a pixel width and height, but it does allow them to scale the image (2x bigger/smaller). It may not be as specific, but it will prevent users from distorting the image when hard-coding width and height. Tested with colliderect and rotate. Hope it helps. |
Scaling the image would be great, eg. via using
|
My pull request does use |
Minimizing image distortion by allowing only whole-number factors is a good thing. My use case is flexibility, eg. for maze-alike games like pacman where your images and actors must be resized to the same tile size of the "game grid". If I have to use only images with the correct pixel size
Furthermore games should support different screen resolutions and therefore scaling of the game window and the images. Just my opinion, still |
Any updates? This issue has existed for 7 years now and there's still no way to scale an actor. |
For anyone visiting this The only way I was able to get it to work was by using the images object to load the image and then scale the result.
So then I was able to blit the image itself onto the screen.
Example
|
Originally reported by: Daniel Pope (Bitbucket: lordmauve, GitHub: lordmauve)
Assigning to height and width could cause the actor to be scaled.
This might scale around the 'pos' position.
The text was updated successfully, but these errors were encountered: