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

drawImage issues when using centerx/y #1742

Closed
gfwilliams opened this issue Jan 10, 2020 · 1 comment
Closed

drawImage issues when using centerx/y #1742

gfwilliams opened this issue Jan 10, 2020 · 1 comment

Comments

@gfwilliams
Copy link
Member

@gfwilliams gfwilliams commented Jan 10, 2020

http://forum.espruino.com/conversations/342478/

@gfwilliams
Copy link
Member Author

@gfwilliams gfwilliams commented Jan 15, 2020

The drawImage rotation sets the start coordinates for rendering as follows:

      if (rotateIsSet) {
        xPos -= iw/2;
        yPos -= ih/2;
      }

But this is assuming that rotation is around the center.

At this point I'm wondering whether we shouldn't just remove centerx/y

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

1 participant