up: programming - HTML  
programming - HTML5 - canvasWhat links here?
include a canvas in a webpage:
<canvas id="a_canvas" width="300" height="225">


obtain a reference to the canvas to use with javascript:
var a_canvas = document.getElementById("a_canvas");
var a_context = a_canvas.getContext("2d");


draw a rectangle:
a_context.fillRect(x, y, width, height);


Canvas context properties
stylefillStyleset or return the color, gradient, or pattern used to fill the drawing
stylestrokestyleset or return the color, gradient, or pattern used to draw lines
colorshadowColorset or return the color used for shadows
colorshadowBlurset or return the level used for shadow blurring
colorshadowOffsetXset or return the offset of the shadow from the object
colorshadowOffsetY


Canvas context Methods
createLinearGradient()
createPattern()
createRadialGradient()
addColorStop()



Resources
WWW Schools - HTML Canvas Reference
MDN - HTMLCanvasElement
Dive Into HTML5 #4 Let's call it a drawing surface
programming - HTML5 - canvas
programming - C - function fseek
programming - C - function utime
programming:c:function gets
filename:programming - HTML5 - canvas
filename:programming%20%2D%20HTML5%20%2D%20canvas
last edit:October 23 2015 21:06:23 (3997 days ago)
ct = 1791040245.000000 = October 03 2026 15:10:45
ft = 1445634383.000000 = October 23 2015 21:06:23
dt = 345405862.000000