从0.1开始学C#  
小女子要开始学习C#了,主要是网络编程和画图两方面。 以前只学过C,也没怎么编过程序, 故而这个标题。 学习过程中,把自己学习的东西总结一下。 希望偶尔路过的高人多多指教 谢谢!^_^

1 、旋转

e.Graphics.RotateTransform(30.0F, MatrixOrder.Prepend);

2、平移

 e.Graphics.TranslateTransform(100.0F, 0.0F);

3、缩放

 e.Graphics.ScaleTransform(3.0F, 1.0F, MatrixOrder.Append);
4、点坐标变换

            e.Graphics.TranslateTransform(40, 30);
            e.Graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.World, points);
            e.Graphics.ResetTransform();

Code

 

5、选择参数:将此变换参数放在已有的变换矩阵之后还是之前。MatrixOrder.Append//MatrixOrder.Prepend  

//----------------旋转和平移的顺序不一样,得到的结果页不一样。

6、辅助功能

 GraphicsState transState = e.Graphics.Save();//保存当前绘图板状态

e.Graphics.ResetTransform();//重置

e.Graphics.Restore(transState);//置为此状态

posted on 2009-05-18 14:49  阿朵  阅读(4024)  评论(0编辑  收藏  举报