Sign in to follow this  

Unity [web] Android HTML canvas images distorted

This topic is 2833 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been working on a web application using HTML 5's new canvas tag. My code works great in Chrome and full Safari, but on Android's browser my images are blown up. I'm using the 2d context's drawImage method to render. Here's the code:
context.setTransform(1, 0, 0, 1, -viewportX, -viewportY);
context.drawImage(image, 0, 0, 32, 32, 0, 0, 32, 32);
Oh, and no scaling is applied to the matrix, which I'm sure of because it is pixel-perfect on Chrome and full Safari. Does anybody have any idea what I might be doing wrong? I haven't had an opportunity to test this on mobile Safari yet. Maybe I'll do that tonight if I get the opportunity.

Share this post


Link to post
Share on other sites

This topic is 2833 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this