html5 example of canvas method