For drawing pixels on html5 canvas