Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add screen size access to CanvasM monad. Because ghcjs-base does
not implement the CanvasRenderingContext2d.canvas property, I decided to plumb the size through the CanvasM monad for the JS implementation. That could be changed. This currently doesn't change anything. However, it does pave the road to make use of this information when drawing. One use case is an infinite coordinate plane a la #944, which would need to use the screen size and current transformation to decide which subset of the infinite plane to draw.
- Loading branch information
Showing
2 changed files
with
53 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters