方法一:如图(图四非必须,退回是为了能使用原坐标系统的坐标)
Bitmap bmp = new Bitmap("test.bmp"); //模板
Graphics g = Graphics.FromImage(bmp);
RectangleF r2 = new RectangleF(bmp.Width * (25 - 1.11f - 1.33f) / 25, bmp.Height * 1.05f / 25, bmp.Width * 1.33f / 25, bmp.Height * 15.82f / 25);
//方法一:中心旋转
//g.TranslateTransform(r2.X + r2.Width / 2, r2.Y + r2.Height / 2);//把画板(Graphics对象)平移到旋转中心
//g.RotateTransform(45);//顺时针旋转画板45度
//g.TranslateTransform(-(r2.X + r2.Width / 2), -(r2.Y + r2.Height / 2));//把画板平移退回相同的距离
//法二:矩阵旋转
Matrix matrix = g.Transform;//获取此 g 的几何世界变换的副本
matrix.RotateAt(180, new PointF(r2.X + r2.Width / 2, r2.Y + r2.Height / 2));//沿 point 参数中指定的点并通过预先计算该旋转,来顺时针旋转此matrix
g.Transform = matrix; //设置此 g 的几何世界变换的副本
g.DrawString("HELLO", f, Brushes.Black, r2, new StringFormat(StringFormatFlags.DirectionVertical));//旋转后画文字
g.ResetTransform(); //回到原始状态,相当于取消了所有对画板的操作
g.DrawEllipse(new Pen(Color.Red), r2); //回到旋转前 画椭圆
bmp.Save("result.bmp", System.Drawing.Imaging.ImageFormat.Bmp); //保存