Advertisement
Guest User

Untitled

a guest
Jul 10th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.55 KB | None | 0 0
  1.             <section id="editorContainer">
  2.                 <canvas id="editor" width="480" height="480"></canvas>
  3.             </section>
  4.  
  5.             var editor = document.getElementById("editor"),
  6.             context = editor.getContext("2d"),
  7.             //create/load image
  8.             image = $("<img/>",
  9.             {
  10.                 src: "img/giraffe.jpg",
  11.                 load: function()
  12.                 {
  13.                     ///draw image from the source
  14.                     context.drawImage(this, 0, 0);
  15.                 }
  16.             }),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement