📅  最后修改于: 2022-03-11 15:04:00.533000             🧑  作者: Mango
function drawRotated(degrees){
context.clearRect(0,0,canvas.width,canvas.height);
context.save();
context.translate(canvas.width/2,canvas.height/2);
context.rotate(degrees*Math.PI/180);
context.drawImage(image,-image.width/2,-image.width/2);
context.restore();
}