New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

simple-raster

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-raster

Rasterize simple 2d shapes into a typed data array

0.1.31
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

** Draw simple shapes into a Typed Array as a 2d image.**

Four funcitons are exported:

  • drawBox(buffer, width, x, y, h, w, rot, color, rop)
  • drawCircle(buffer, width, x, y, rad, color, rop)
  • drawPolygon(buffer, width, points, color, rop)
  • drawEllipse(buffer, width, x, y, h, w, rot, color, rop)

Arguments:

  • buffer - a TypedArray of data to draw into.
  • width - the width of the first dimension buffer.
  • x, y - center position of the shape to draw.
  • h, w - height and width of the shape.
  • color - value or "color" to draw.
  • rop - raster operation to perform, either set or add. If undefined "set" is the default.

Keywords

raster

FAQs

Package last updated on 02 May 2014

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