https://github.com/component/autoscale-canvas
Retina-enable an HTML Canvas element
https://github.com/component/autoscale-canvas
Last synced: 8 months ago
JSON representation
Retina-enable an HTML Canvas element
- Host: GitHub
- URL: https://github.com/component/autoscale-canvas
- Owner: component
- Created: 2012-08-18T19:59:39.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-10-09T23:29:15.000Z (over 12 years ago)
- Last Synced: 2025-04-03T07:05:02.151Z (12 months ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 45
- Watchers: 4
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# Autoscale-canvas
Retina-enable an HTML canvas according to `devicePixelRatio`.
## Installation
```
$ component install component/autoscale-canvas
```
## API
```js
var autoscale = require('autoscale-canvas');
autoscale(document.querySelector('canvas'));
```
## License
MIT