UNPKG

canvas-hd

Version:

Draw in high definition to a CanvasRenderingContext2D

25 lines (16 loc) 741 B
## High Quality Canvas Rendering This is a small library which comes with its own wrapper for creating a 2D rendering context that will draw anything on it in high definition. It is based on [this great article](https://www.html5rocks.com/en/tutorials/canvas/hidpi/). Unlike most other APIs, it won't influcence customly applied transformations. ```js const makeHD = require('canvas-hd') const canvas = document.createElement('canvas') const ctxt1 = makeHD(canvas) // if you ever lose the context const ctxt2 = makeHD(canvas) ``` ## Related - [hidpi-canvas](https://www.npmjs.com/package/hidpi-canvas) - [canvas-dpi-scaler](https://www.npmjs.com/package/canvas-dpi-scaler) - [hd-canvas](https://github.com/theoperatore/hdcanvas/)