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

Master #1

Merged
merged 2 commits into from
Jun 12, 2015
Merged

Master #1

merged 2 commits into from
Jun 12, 2015

Conversation

asthomas
Copy link
Contributor

Add automatic resolution scaling for canvas on devices where the device pixel ratio is not 1:1.

Fix some errors during compile.

asthomas added 2 commits May 24, 2015 14:50
Canvas on high-resolution screens uses a backing store ratio and device
pixel ratio other than 1:1.  This adds code to keep the virtual canvas
at the optimal resolution for the target device.
Code would not compile without an explicit cast of
canvas.getContext('2d') into CanvasRenderingContext2D.
@BSick7
Copy link
Member

BSick7 commented May 26, 2015

It's best to localize device resolution to /src/engine/Surface.ts. It would make the most sense to me to create a mediator to the surface that translates virtual spaces. When rendering and hit-testing, the Surface would delegate to the mediator to translate between the 2 virtual spaces.

@BSick7 BSick7 merged commit bca5a20 into wsick:master Jun 12, 2015
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

Successfully merging this pull request may close these issues.

2 participants