caleb531 / jcanvas

A jQuery plugin that makes the HTML5 canvas easy to work with.
https://projects.calebevans.me/jcanvas/
MIT License
626 stars 192 forks source link

How to display an image in Canvas ? AND How to give a Background color to canvas ? #126

Closed satya1907 closed 11 years ago

satya1907 commented 11 years ago

Hello,

I am new to jcanvas. :( I am trying to make a canvas with a Background Color "Black" and want to put an image inside it within a rectangle.. How can it be possible ?

Thanks

caleb531 commented 11 years ago

The easiest way to set a background on the canvas is with CSS. However, you can also use drawRect() and drawImage() methods to create a rectangle/image the size of the canvas.

-Caleb