Skip to content
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

Bird doesn't seem to rotate #11

Open
anasbaig10 opened this issue Apr 19, 2020 · 3 comments
Open

Bird doesn't seem to rotate #11

anasbaig10 opened this issue Apr 19, 2020 · 3 comments

Comments

@anasbaig10
Copy link

new_rect = rotated_image.get_rect(center = image.get_rect(topleft = topleft).center)
DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using int is deprecated, and may be removed in a future version of Python.

@daspoderman
Copy link

I'm having the same problem...
Did you manage to solve it? Or does anyone else know what the problem might be?

@DoctorMikeReddy
Copy link

Line 123 should be:
blitRotateCenter(win, self.img, (self.x, round(self.y)), self.tilt)
because the blit function below where you are getting the error from requires ints. If you print out the value of topleft when debugging, you will notice that the y value is always Num.0 or Num.5, so round or int can be used. So, it is quite easy to fix if you know where to look; bugs are rarely where the code says they are

@DoctorMikeReddy
Copy link

@techwithtim this can probably be closed now, and the bug fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants