November 2011
Intermediate to advanced
348 pages
7h 2m
English
If a royal flush gets your adrenaline going, then this one's for you. In this recipe, we'll create drawing functions for the spade, heart, club, and diamond suits.

Follow these steps to draw a spade, heart, club, and diamond suit:
function drawSpade(context, x, y, width, height){ context.save(); var bottomWidth = width * 0.7; var topHeight = height * 0.7; var bottomHeight = height * 0.3; context.beginPath(); context.moveTo(x, y); // top left of spade context.bezierCurveTo( ...