Skip to content

Commit

Permalink
Update docs.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Venerons authored Sep 9, 2022
1 parent ce6509b commit 945a179
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ Export the canvas as a data URL string.
const data = paper.toDataURL();
const data = paper.toDataURL({ type: 'image/png' });
const data = paper.toDataURL({ type: 'image/jpeg', quality: 0.5 });
const data = paper.toDataURL({ type: 'image/webp', quality: 0.5 });
```

## .toBlob()
Expand All @@ -279,4 +280,7 @@ paper.toBlob({ type: 'image/png' }, function (blob) {
paper.toBlob({ type: 'image/jpeg', quality: 0.5 }, function (blob) {
console.log('Done.');
});
paper.toBlob({ type: 'image/webp', quality: 0.5 }, function (blob) {
console.log('Done.');
});
```

0 comments on commit 945a179

Please sign in to comment.