title: HTML5 Canvas: Drawing shapes around edges of the canvas
body: <p>I'm creating a basic game that draws squares at random positions on a canvas, but sometimes the shape gets cut off because it's outside of the canvas' boundaries. Can any one explain how I could go about getting the square to be drawn on the other side of the canvas (similar to how it's done in <a href="http://www.play.vg/games/4-Asteroids.html" rel="nofollow">asteroids</a>)? The searches I've come up with haven't been helpful. Any help is appreciated. </p>