C#利用GDI+绘制带角度的字符串、图片

            

1             int s = DateTime.Now.Second;
2 Graphics g = e.Graphics;
3 g.SmoothingMode = SmoothingMode.AntiAlias;
4
5 g.TranslateTransform(label1.Width / 2.0f, label1.Height / 2.0f);
6 g.RotateTransform((float)s * 6-90);
7 g.DrawLine(new Pen(Color.Red, 3.0f), 0, 0, 110, 0);
8
9 g.DrawString(s.ToString()+"我是字符串", this.Font, Brushes.Black, 0, 0);先上截图:


 

 

posted @ 2011-10-21 11:31  lanmiao  阅读(479)  评论(0编辑  收藏  举报