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

skia-canvas

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skia-canvas - npm Package Compare versions

Comparing version 0.9.19 to 0.9.20

LICENSE

8

lib/classes.js

@@ -288,5 +288,7 @@ "use strict"

if (Buffer.isBuffer(src)) data = src
else if (typeof src != 'string') return
else if (/^\s*data:/.test(src)) {
if (Buffer.isBuffer(src)){
[data, src] = [src, '']
} else if (typeof src != 'string'){
return
} else if (/^\s*data:/.test(src)) {
// data URI

@@ -293,0 +295,0 @@ let split = src.indexOf(','),

{
"name": "skia-canvas",
"version": "0.9.19",
"version": "0.9.20",
"description": "A canvas environment for Node",

@@ -53,4 +53,4 @@ "main": "lib/index.js",

"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.1",
"glob": "^7.1.6",
"node-pre-gyp": "^0.15.0",
"simple-get": "^4.0.0",

@@ -57,0 +57,0 @@ "string-split-by": "^1.0.0"

@@ -35,4 +35,11 @@ # Skia Canvas

Until prebuilt binaries can be provided you’ll need to compile the portions of this library that directly interface with Skia. For this you’ll need to install:
On macOS and Linux, installation *should* be as simple as:
```console
$ npm install skia-canvas
```
This will download a pre-compiled library from the project’s most recent [release](https://github.com/samizdatco/skia-canvas/releases). Note that these binaries are in an early state and currently only work with fairly recent systems. In particular, if using the library with Docker you’ll want to pick a base system from the last few years like [`node:buster`](https://hub.docker.com/_/node) or [`ubuntu:bionic`](https://hub.docker.com/_/ubuntu).
If prebuilt binaries aren’t available for your system you’ll need to compile the portions of this library that directly interface with Skia. Start by installing:
1. The [Rust compiler](https://www.rust-lang.org/tools/install) and cargo package manager using `rustup`

@@ -43,9 +50,4 @@ 2. Python 2.7 (Python 3 is not supported by [neon](https://neon-bindings.com/docs/getting-started#install-node-build-tools))

Once these are all in place, installation *should* be as simple as:
```console
$ npm install skia-canvas
```
Once all these dependencies are present, installing from npm should work (after a fairly lengthy compilation process).
> Development of this library has taken place entirely on macOS, so reports from users of other platforms on the specifics of getting everything to compile properly would be appreciated.
## Module Contents

@@ -117,24 +119,24 @@

|----------------------------------------|---------------------------------------------|--------------------------------------|----------------------------------------------------------|
| [**canvas**](#canvas) [⚡](#canvas) | [clearRect()][clearRect()] | [**fillStyle**][fillStyle] | [**filter**][filter] |
| [**canvas**](#canvas) [⚡](#canvas) | [clearRect()][clearRect()] | [**fillStyle**][fillStyle] | [**filter**][filter] |
| [**globalAlpha**][globalAlpha] | [drawImage()][drawImage()] | [**lineCap**][lineCap] | [**globalCompositeOperation**][globalCompositeOperation] |
| [beginPath()][beginPath()] | [fill()][fill()] | [**lineDashOffset**][lineDashOffset] | [**shadowBlur**][shadowBlur] |
| [clip()][clip()] | [fillRect()][fillRect()] | [**lineJoin**][lineJoin] | [**shadowColor**][shadowColor] |
| [isPointInPath()][isPointInPath()] | [fillText()][fillText()] [⚡][drawText] | [**lineWidth**][lineWidth] | [**shadowOffsetX**][shadowOffsetX] |
| [isPointInPath()][isPointInPath()] | [fillText()][fillText()] [⚡][drawText] | [**lineWidth**][lineWidth] | [**shadowOffsetX**][shadowOffsetX] |
| [isPointInStroke()][isPointInStroke()] | [stroke()][stroke()] | [**miterLimit**][miterLimit] | [**shadowOffsetY**][shadowOffsetY] |
| [restore()][restore()] | [strokeRect()][strokeRect()] | [**strokeStyle**][strokeStyle] | |
| [save()][save()] | [strokeText()][strokeText()] [⚡][drawText] | [getLineDash()][getLineDash()] | |
| [save()][save()] | [strokeText()][strokeText()] [⚡][drawText] | [getLineDash()][getLineDash()] | |
| | | [setLineDash()][setLineDash()] | |
| Bezier Paths | Typography | Pattern & Image | Transform |
|------------------------------------------|-------------------------------------------------------------|----------------------------------------------------|----------------------------------------|
| [arc()][arc()] | [**direction**][direction] | [**imageSmoothingEnabled**][imageSmoothingEnabled] | [**currentTransform**][currentTransform] |
| [arcTo()][arcTo()] | [**font**][font] | [**imageSmoothingQuality**][imageSmoothingQuality] | [getTransform()][getTransform()] |
| [bezierCurveTo()][bezierCurveTo()] | [**fontVariant** ⚡](#fontvariant) | [createImageData()][createImageData()] | [resetTransform()][resetTransform()] |
| [closePath()][closePath()] | [**textAlign**][textAlign] | [createLinearGradient()][createLinearGradient()] | [rotate()][rotate()] |
| [ellipse()][ellipse()] | [**textBaseline**][textBaseline] | [createPattern()][createPattern()] | [scale()][scale()] |
| [lineTo()][lineTo()] | [**textTracking** ⚡](#texttracking) | [createRadialGradient()][createRadialGradient()] | [setTransform()][setTransform()] |
| [moveTo()][moveTo()] | [**textWrap** ⚡](#textwrap) | [getImageData()][getImageData()] | [transform()][transform()] |
| [quadraticCurveTo()][quadraticCurveTo()] | [measureText()][measureText()] [⚡](#measuretextstr-width) | [putImageData()][putImageData()] | [translate()][translate()] |
| [rect()][rect()] | | | |
| Bezier Paths | Typography | Pattern & Image | Transform |
|------------------------------------------|-------------------------------------------------------------|----------------------------------------------------|------------------------------------------|
| [arc()][arc()] | [**direction**][direction] | [**imageSmoothingEnabled**][imageSmoothingEnabled] | [**currentTransform**][currentTransform] |
| [arcTo()][arcTo()] | [**font**][font] [⚡](#font) | [**imageSmoothingQuality**][imageSmoothingQuality] | [getTransform()][getTransform()] |
| [bezierCurveTo()][bezierCurveTo()] | [**fontVariant** ⚡](#fontvariant) | [createImageData()][createImageData()] | [resetTransform()][resetTransform()] |
| [closePath()][closePath()] | [**textAlign**][textAlign] | [createLinearGradient()][createLinearGradient()] | [rotate()][rotate()] |
| [ellipse()][ellipse()] | [**textBaseline**][textBaseline] | [createPattern()][createPattern()] | [scale()][scale()] |
| [lineTo()][lineTo()] | [**textTracking** ⚡](#texttracking) | [createRadialGradient()][createRadialGradient()] | [setTransform()][setTransform()] |
| [moveTo()][moveTo()] | [**textWrap** ⚡](#textwrap) | [getImageData()][getImageData()] | [transform()][transform()] |
| [quadraticCurveTo()][quadraticCurveTo()] | [measureText()][measureText()] [⚡](#measuretextstr-width) | [putImageData()][putImageData()] | [translate()][translate()] |
| [rect()][rect()] | | | |

@@ -184,2 +186,6 @@

##### `.font`
By default any [`line-height`][lineHeight] value included in a font specification (separated from the font size by a `/`) will be preserved but ignored. If the `textWrap` property is set to `true`, the line-height will control the vertical spacing between lines.
##### `.fontVariant`

@@ -343,2 +349,3 @@

[Path2D]: https://developer.mozilla.org/en-US/docs/Web/API/Path2D
[lineHeight]: https://developer.mozilla.org/en-US/docs/Web/CSS/line-height

@@ -345,0 +352,0 @@ [canvas]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/canvas

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