New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-canvas-graphics-wrapper

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

node-canvas-graphics-wrapper

A package that wraps a canvas element to a Java like Graphics object

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

node-canvas-graphics-wrapper

A package that wraps an html canvas to Java Graphics object.

How to use

Here there is an example that draws a red line, an empty black rectangle and a green-filled circle:

var Graphics = require('node-canvas-graphics-wrapper')

// var canvas = $('#mycanvas')[0]                 // getting the canvas with jquery
var canvas = document.getElementById('mycanvas')  // or with document.getElementById()

var viewport = { width: 1920, height: 1080 }
var g = Graphics.createFromCanvas(canvas, viewport)

g.setColor('#FF0000')
g.drawLine(100, 100, 200, 200)

g.setColor('#000000')
g.drawRect(100, 100, 50, 50)
g.setColor('#00FF00')
g.fillCircle(300, 300, 50)

Keywords

graphics

FAQs

Package last updated on 25 Oct 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