日期:2014-05-17 浏览次数:20867 次
gMem.TranslateTransform(0, (-currentPf.Y - movePf.Y - this.Font.Height) / 2, MatrixOrder.Prepend); gMem.ScaleTransform(1, -1, MatrixOrder.Append); gMem.TranslateTransform(0, (currentPf.Y + movePf.Y + this.Font.Height) / 2, MatrixOrder.Append);
------解决方案--------------------
上面的写错了。用这个
using (Graphics G = Graphics.FromHwnd(this.Handle)) { //定义临时图层 using (Bitmap B = new Bitmap(50, 50)) { using (Graphics G2 = Graphics.FromImage(B)) { G2.DrawString("这是翻过来的文字", this.Font, Brushes.Black, new Point(0, 0)); } //将临时图层以Width负长度绘制得到左右倒图(Height负长度将得到垂直倒图) G.DrawImage(B, new Rectangle(100, 100, -50, 50), new Rectangle(0, 0, B.Width, B.Height), GraphicsUnit.Pixel); } }