Showing posts with label fillRect. Show all posts
Showing posts with label fillRect. Show all posts

Saturday, August 4, 2012

HTML5 - Canvas - Tutorial 4 (Gradient)

Tutorial 4 - Canvas Element





Tutorial will teach you to give gradient effect to object.

Click here to download the source code and document which will explain the usage of each methods and their parameters.

Friday, August 3, 2012

HTML5 - Canvas Tutorial - 3


Tutorial will teach you to play with shadow of drawing object in HTML5.

Click here to download source code of tutorials.

Thursday, August 2, 2012

HTML5 - Canvas Tutorial - 2



Using canvas element, i have developed small application which will offer the color. user can set Red, Green and Blue colors using slider elements and based on that, new color will be formed. I have introduced Opacity attribute that will add transparency to selected color.

Click on source code, to get source of the sample. Here, you can learn about  getContext, clearRect, fillStyle, fillRect and fillText methods of Canvas elements.