日期:2014-05-17 浏览次数:20930 次
public Form1()
{
InitializeComponent();
}
protected override void OnPaint(PaintEventArgs e)
{
if (true)
{
// 方法一
e.Graphics.TranslateTransform(this.ClientRectangle.Width, 0);
e.Graphics.ScaleTransform(-1, 1);
}
else
{
//方法二
Matrix matrix = new Matrix();
matrix.Translate(this.ClientRectangle.Width, 0);
matrix.Scale(-1, 1);
e.Graphics.Transform = matrix;
}
e.Graphics.DrawString("hello matrix", this.Font, Brushes.Black, 30, 30);
}