Jump to content

schoening

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About schoening

  • Rank
    Newbie
  1. But, shouldn't this ugly code work? http://cdpn.io/sqtLx
  2. I am trying to create my own Image( ); Object. This is how the build in Image function works: var img = new Image(); // Create new img element img.src = 'myImage.png'; // Set source path ctx.drawImage(img,0,0) is going to draw the image loaded from the img.src property. But I don't understand why.. Why am I not required to type: ctx.drawImage(img.src,0,0) ?? In fact, that breaks the script. Saying Type Error Please help me out here, I want to create my own "new Image()" with custom properties and methods..
×
×
  • Create New...