欢迎加我的QQ群:193522571,一起来讨论、交流!

坐标系改变后文字正常写入,临时修改graphics

    public void DrawText(Graphics g, Pen blackPen, float fFontHeight)
    {
      SolidBrush mybrush = new SolidBrush(Color.White);
      Font myfont = new Font("黑体", fFontHeight);
      PointF mypointf = new PointF();
      mypointf.X = (float)(PtEnd.X + fFontHeight);
      mypointf.Y = -((float)(PtEnd.Y)+ fFontHeight / 4 * 3);
      GraphicsState gs = g.Save();
      g.ScaleTransform(1f, -1f);
      g.DrawString(Count.ToString(), myfont, mybrush, mypointf);
      g.Restore(gs);
    }

 

posted @ 2018-07-18 09:01  swtool  阅读(196)  评论(0编辑  收藏  举报
欢迎加我的QQ群:193522571,一起来讨论、交流!