rt,想竖着绘一排文字,用什么方法呢,应该不会一个个绘吧

解决方案 »

  1.   

    这样来弄:
    public void DrawVerticalString()
    {
        System.Drawing.Graphics formGraphics = this.CreateGraphics();
        string drawString = "Sample Text";
        System.Drawing.Font drawFont = new System.Drawing.Font("Arial", 16);
        System.Drawing.SolidBrush drawBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black);
        float x = 150.0F;
        float y = 50.0F;
        System.Drawing.StringFormat drawFormat = new System.Drawing.StringFormat();
        drawFormat.FormatFlags = StringFormatFlags.DirectionVertical;
        formGraphics.DrawString(drawString, drawFont, drawBrush, x, y, drawFormat);
        drawFont.Dispose();
        drawBrush.Dispose();
        formGraphics.Dispose();
    }
      

  2.   

    StringFormatFlags.DirectionVertical;
      

  3.   

    Graphics.RotateTransform(10);  //顺时针转10度
    Graphics.DrawString
    Graphics.ResetTransform();  //取消全部变换。