はい、できます!
描画する前にキャンバスを水平に反転すると、その後に描画するすべてが反転します。
パフォーマンスのペナルティなし!
もちろん、反転を行う前に context.save() を実行し、描画後に context.restore() を実行して、反転されていないキャンバスにさらに描画が行われるようにします。
描画の前にキャンバスを反転するには、次の変換を行います。
context.translate(canvas.width,0);
context.scale(-1,1);
ここにコードとフィドルがあります: http://jsfiddle.net/m1erickson/nFvaU/
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" media="all" href="css/reset.css" /> <!-- reset css -->
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<style>
body{ background-color: ivory; }
canvas{border:1px solid red;}
img{border:1px solid blue;}
</style>
<script>
$(function(){
var canvas=document.getElementById("canvas");
var ctx=canvas.getContext("2d");
var img=new Image();
img.onload=function(){
// 1. Save the un-flipped canvas
ctx.save();
// 2. Flip the canvas horizontally
ctx.translate(canvas.width,0);
ctx.scale(-1,1);
// 3. Draw the image -- or you're path of a car
ctx.drawImage(img,0,0);
// 4. Restore the canvas so further draws are not flipped horizontally
ctx.restore();
}
img.src="http://dl.dropbox.com/u/139992952/car.png";
}); // end $(function(){});
</script>
</head>
<body>
<p>Original Image</p>
<img src="http://dl.dropbox.com/u/139992952/car.png" width=200 height=78>
<p>Horizontally flipped Image on Canvas</p>
<canvas id="canvas" width=200 height=78></canvas>
</body>
</html>