Skip to content

Commit

Permalink
Merge pull request #678 from canvg/beta_readme
Browse files Browse the repository at this point in the history
beta readme
  • Loading branch information
gabelerner committed Jan 14, 2019
2 parents 0e777cc + b9c9223 commit f236319
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
@@ -1,7 +1,7 @@
# Change Log

## v2.0.0 (beta)
- *Breaking change*: now dependent on [canvas 2.x](https://github.com/Automattic/node-canvas)
- **Breaking change**: now dependent on [canvas 2.x](https://github.com/Automattic/node-canvas)
- Implement focal gradient radius ([#675](https://github.com/canvg/canvg/pull/675))
- Fixes 0 height rects ([#674](https://github.com/canvg/canvg/pull/674))
- Fixes masks with alpha ([#672](https://github.com/canvg/canvg/pull/672))
Expand Down
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -45,6 +45,10 @@ Locally, you can run `npm start` and view the examples at [http://localhost:3123

`npm install canvg`

**2.0.0 beta** (see [CHANGELOG](https://github.com/canvg/canvg/blob/master/CHANGELOG.md))

`npm install canvg@2.0.0-beta.0`

## Usage on the Browser

Include the following files in your page:
Expand All @@ -57,6 +61,16 @@ Include the following files in your page:
<script src="https://cdn.jsdelivr.net/npm/canvg/dist/browser/canvg.min.js"></script>
```

For the **2.0.0 beta** (see [CHANGELOG](https://github.com/canvg/canvg/blob/master/CHANGELOG.md)), use this:
```html
<!-- Required to convert named colors to RGB -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/canvg/1.4/rgbcolor.min.js"></script>
<!-- Optional if you want blur -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/stackblur-canvas/1.4.1/stackblur.min.js"></script>
<!-- Main canvg code -->
<script src="https://cdn.jsdelivr.net/npm/canvg@2.0.0-beta.0/dist/browser/canvg.min.js"></script>
```

Put a canvas on your page
```html
<canvas id="canvas" width="1000px" height="600px"></canvas>
Expand Down

0 comments on commit f236319

Please sign in to comment.