使用时SpriteBatch.Draw,可以在将纹理绘制到缓冲区时旋转(和缩放)纹理,尽管您需要指定大多数(或所有)参数.角度以弧度给出.
SpriteBatch.Begin();
angle = (float)Math.PI / 2.0f; // 90 degrees
scale = 1.0f;
SpriteBatch.Draw(myTexture, sourceRect, destRect, Color.White, angle,
position, scale, SpriteEffects.None, 0.0f);
SpriteBatch.End();
Run Code Online (Sandbox Code Playgroud)
http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.spritebatch.draw.aspx
您还可以加载图像的预旋转副本,但您可能会获得通常的过早优化讲座.