Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <section id="editorContainer">
- <canvas id="editor" width="480" height="480"></canvas>
- </section>
- var editor = document.getElementById("editor"),
- context = editor.getContext("2d"),
- //create/load image
- image = $("<img/>",
- {
- src: "img/giraffe.jpg",
- load: function()
- {
- ///draw image from the source
- context.drawImage(this, 0, 0);
- }
- }),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement