Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

canvas-dpi-scaler

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canvas-dpi-scaler

Utility to scale and <canvas> for Retina and other high resolution screens.

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
107
increased by21.59%
Maintainers
1
Weekly downloads
 
Created
Source

Canvas DPI Scaler

Utility to scale and for Retina and other high resolution screens.

Usage:

Install with npm or <script>: npm install canvas-dpi-scaler or <script href='canvas-dpi-scaler.js'>

canvasDpiScaler(canvas, context, [customWidth], [customHeight])
var canvasDpiScaler = require('canvas-dpi-scaler'),
    canvas = document.getElementById('some-canvas-el'),
    context = canvas.getContext('2d');
    
canvasDpiScaler(canvas, context); // That's it; you're done!

About

Based on this HTML5 rocks article.

Written by @ChrisPolis, under MIT License.

Demo Screenshot (from Retina MBP)

demo

Keywords

FAQs

Package last updated on 27 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc