{"name":"drawille-canvas","version":"1.2.1","description":"HTML5 Canvas API for drawille","main":"index.js","scripts":{"test":"node example.js","build":"browserify ./example.js -d -o ./bundle.js","watch":"watchify ./example.js -d -o ./bundle.js"},"browser":"./browser.js","repository":{"type":"git","url":"git://github.com/madbence/node-drawille-canvas.git"},"keywords":["drawille","canvas"],"author":{"name":"Bence Dányi","email":"madbence@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/madbence/node-drawille-canvas/issues"},"homepage":"https://github.com/madbence/node-drawille-canvas","dependencies":{"bresenham":"0.0.3","drawille":"^1.1.0","earcut":"^2.1.1","gl-matrix":"^3.3.0"},"devDependencies":{"browserify":"^12.0.1","performance-now":"^0.2.0","watchify":"^3.6.0"},"gitHead":"4ef9a5212d4bd8ed250e6600ef8db850a723939b","_id":"drawille-canvas@1.2.1","_nodeVersion":"14.3.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-9VhpmwIOfRx5iKcYapLr+9Iv6TbxuqeQCNG4I7+DYzaJlzq25aYElEgZXee3Hiw3UUxAOjrLWcq1uSX91J/aJg==","shasum":"9a49e62fca3939359e5961d4f56fe59cf34cd95d","tarball":"http://registry-npm.ywwl.com/drawille-canvas/download/drawille-canvas-1.2.1.tgz","fileCount":7,"unpackedSize":14091,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf5RC6CRA9TVsSAnZWagAAw4cP/ip2ALzKopIlYaONNdIZ\np4xt0SKdSgScEfbnZQ6qru1oqEKzkAg2Ey7qdCDgqlLDCUrWFGHYBmSnBfws\nuUF8R0Fz7jnkStrL+fujwQwh+Vk/mQTYfhX/Prc/jG39Bq5DdqOVuGfrXZbv\nCa+VV4vUnM7q616JZHVQDZCP3HOzdtU5l8j7MQoTpv9eVYlTlKM5EpDjo6+S\n00IOI5YgWOfIfnKq0qxpL1be6yoJln2tLgQj+30sL4onuXQrhVpFblPOH5GY\nfWBJVEptyrJsnV+3iAxrMq8+shoUIKXQrzAFsj0YtEB7kvaxR0jVsixFy2XN\nGq51va8eCtSSZkDX+Gu7xe/nKJXY6Ff8f/X5sogSnoWFJaOL71PYBhB24uQu\njQu7gd3se8LhwQtMMbZAaMI9uPLgr2DWSuBJg0skXbpcjjJdGKxtdPTneHlB\nQ8kJphIWfuwB2XKMSGZH5t1L70SNxtqdtU0jZp26kBNzs3VBZTuAAYIl0wLJ\nbSTDfp/6dIRqbpptXMhebaCBdFV9ssiDMjyVJuxPgxOTStT5CjXFEISSZZ1C\nDq3SGwI1SGJ1O8TQ2MIwQjNLNQXuy4ALixiPLB0omkBOfiba59QRhBstau/q\nt8XnReRl5CduHAS57qFYCU1XM/djKM1OzB+8LEIINwYmp05Mc45M1vDiaCr/\nqzEU\r\n=/x3T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+/hPhgEdKlxkOf66ZEKTY38TdsgKmB3GuPBvBP0UYhgIhAMy8r+D4aegjTkLEujNpzwApnqPz0hJkhq6kTCgw3RbD"}],"size":4799,"noattachment":false,"key":"/drawille-canvas/-/drawille-canvas-1.2.1.tgz"},"_npmUser":{"name":"dfcreative","email":"df.creative@gmail.com"},"directories":{},"maintainers":[{"name":"lennon","email":"madbence@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/drawille-canvas_1.2.1_1608847546199_0.05401394413213123"},"_hasShrinkwrap":false,"readme":"# drawille-canvas\r\n\r\n![anim](anim.gif)\r\n\r\nHTML5 Canvas API for [`drawille`](https://github.com/madbence/node-drawille).\r\n\r\n## Install\r\n\r\n```\r\n$ npm install drawille-canvas\r\n```\r\n\r\nIn node `v0.10` it's a bit slow, with node `v0.11` it runs very smoothly.\r\n\r\n## Usage\r\n\r\nSee [example](example.js), check out in the console (`node example`) or in the [browser](http://madbence.github.io/node-drawille-canvas/) (`example.html`).\r\n\r\n## API\r\n\r\n### new Canvas(width, height)\r\n\r\nCreate a new `Canvas` with the given dimensions.\r\nFor method details, see [`CanvasRenderingContext2D` on MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D)\r\n\r\n### c.fillRect(x, y, w, h)\r\n\r\nFill the given area of the canvas.\r\n\r\n### c.clearRect(x, y, w, h)\r\n\r\nClear the given area of the canvas.\r\n\r\n### c.save()\r\n\r\nSave the current transformation matrix on the stack.\r\n\r\n### c.restore()\r\n\r\nRestore the last transformation matrix.\r\n\r\n### c.translate(x, y)\r\n\r\nTranslate the current transformation matrix.\r\n\r\n### c.rotate(a)\r\n\r\nRotate the current transformation matrix with the given angles.\r\n\r\n### c.scale(x, y)\r\n\r\nScale the current transformation matrix.\r\n\r\n### c.beginPath()\r\n\r\nStart a new path.\r\n\r\n### c.closePath()\r\n\r\nClose the current path.\r\n\r\n### c.moveTo(x, y)\r\n\r\nMove the starting point of the next segment to the given coordinates.\r\n\r\n### c.lineTo(x, y)\r\n\r\nConnect the starting point with the given point with a straight line.\r\n\r\n### c.arc(x, y, radius, start_angle, end_angle, anticlockwise)\r\n\r\nDraw an arc between two angles at centre x, y.\r\n\r\n### c.stroke()\r\n\r\nStroke the current path.\r\n\r\n### c.fill()\r\n\r\nFill the current path.\r\n\r\n### c.getContext('2d')\r\n\r\nReturn canvas itself, for compliance with browser.\r\n\r\n### c.width, c.height\r\n\r\nCanvas dimensions.\r\n\r\n### c.toString()\r\n\r\nReturn the current content of canvas as a string with braille characters.\r\n\r\n### c.getImageData(sx, sy, sw, sh)\r\n\r\nReturn an ImageData object `{ width, height, data }`, representing the underlying canvas data for the area of the canvas denoted by the rectangle which starts at `sx`, `sy` and has an `sw` width and `sh` height. `data` property is a string with braille characters.\r\n\r\n### c.putImageData(imagedata, dx, dy [, dirtyX, dirtyY, dirtyWidth, dirtyHeight])\r\n\r\nPaint data from the given _imagedata_ object `{ width, height, data }` onto the canvas. If a dirty rectangle is provided, only the area from that rectangle is painted.\r\n\r\n## License\r\n\r\nMIT\r\n","publish_time":1608847546386,"_cnpm_publish_time":1608847546386,"dist-tags":{"latest":"1.2.1"}}