Cut, Copy, Paste & Manipulate HTML5 canvas content with no dependencies
JavaScript HTML CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
notes
test
.bowerrc
.editorconfig
.gitattributes
.gitignore
.yo-rc.json
README.md
bower.json
gulpfile.babel.js
package.json

README.md

CanvasClipboard

A minimal library to perform clipboard actions for HTML5 canvas elements. (4.5K)

Install

Bower

bower install -S CanvasClipboard

Getting Started

var clipboard = new CanvasClipboard();    
clipboard.copy(source, x, y, w, h);
clipboard.scale(2);
clipboard.rotate(30);
clipboard.translate(10, -20);
clipboard.paste(dest);

Methods

copy : clipboard.copy(source, x, y, w, h)

cut : clipboard.cut(source, x, y, w, h)

paste : clipboard.paste(dest, x, y)

scale : clipboard.scale(scale)

rotate : clipboard.rotate(degrees)

translate : clipboard.translate(x, y)