怎么写才能写的字向上斜后,全部画的字 测试1 , 测试2 , 测试3的“测”在一个水平线上

.Net技术 码拜 8年前 (2016-05-28) 849次浏览
  lChartRectangle[]={”测试1″,”测试2″,”测试3″}
for (int i = 0; i < 8; i++)
{
int x = ix * 10
g.ResetTransform();
g.TranslateTransform(-Width / 3,  Height /2  ); //这里怎么写才能写的字向上斜后,全部画的字 测试1 , 测试2 , 测试3的“测”在一个水平线上
g.RotateTransform(-45);
g.DrawString(lChartRectangle[ix].strText, f, Brushes.Black, new Point(Left + x, 500));
ix++;

}

解决方案

1

你这个代码不就是实现斜体吗?

19

g.TranslateTransform(-Width / 3 + x,  Height /2  ); //使每次输出文字的基点平移
g.DrawString(lChartRectangle[ix].strText, f, Brushes.Black, new Point(Left + x, 500));
Left + x 应为定值
怎么写才能写的字向上斜后,全部画的字 测试1 , 测试2 , 测试3的“测”在一个水平线上

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明怎么写才能写的字向上斜后,全部画的字 测试1 , 测试2 , 测试3的“测”在一个水平线上
喜欢 (0)
[1034331897@qq.com]
分享 (0)