Socket
Socket
Sign inDemoInstall

canvas-extras

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.6 to 1.0.7

2

canvas-extras.js

@@ -32,3 +32,3 @@ const Canvas = require('canvas');

this.save();
this.beginPath()
this.beginPath();
if (!emptyFillColor) emptyFillColor = 'black';

@@ -35,0 +35,0 @@ if (!barFillColor) barFillColor = 'white';

{
"name": "canvas-extras",
"version": "1.0.6",
"version": "1.0.7",
"description": "Adds extra handy bits to canvas, including Progress Bars, rounded rectangles, and stadiums.",

@@ -5,0 +5,0 @@ "main": "canvas-extras.js",

@@ -19,5 +19,8 @@ canvas-extras adds extra handy bits to canvas, including Progress Bars, rounded rectangles, and stadiums.

##### Note
For the progress bar to work correctly, **do not** use any code that changes the bar's appearance (e.g. fill() or stroke()) as it will cause the bar to appear incorrectly.
##### Example
```javascript

@@ -50,2 +53,21 @@ ctx.beginPath();

### Stadiums
**Stadiums are also known as capsule shapes or pill shapes**
ctx.stadium(x,y, width, height)
##### Example
```javascript
ctx.beginPath();
ctx.fillStyle = '#aaaaaa';
ctx.stadium(50,50, 500, 100);
ctx.fill();
ctx.closePath();
```
This will yield this result:
![Image of stadium.] (https://rollbot.net/images/stadium.png)
# Other bits

@@ -52,0 +74,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc