注意几个函数的用法:

ctx.save

ctx.restore

ctx.translate

ctx.setTransform

点击查看:canvas_test2