坐标系的变化与图形变换

坐标系的变化与图形变换

ID:40804340

大小:41.50 KB

页数:4页

时间:2019-08-07

坐标系的变化与图形变换_第1页
坐标系的变化与图形变换_第2页
坐标系的变化与图形变换_第3页
坐标系的变化与图形变换_第4页
资源描述:

《坐标系的变化与图形变换》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、坐标系的变化与图形变换privatevoidForm1_Paint(objectsender,PaintEventArgse){Graphicsg=e.Graphics;g.FillRectangle(Brushes.White,this.ClientRectangle);g.DrawRectangle(Pens.Black,10,10,50,50);g.DrawEllipse(Pens.Black,10,10,10,10);g.ScaleTransform(2.0f,3.0f);g.DrawRectangle(Pen

2、s.Black,10,10,50,50);g.DrawEllipse(Pens.Black,10,10,10,10);g.ScaleTransform(0.5f,0.3333333f);g.DrawRectangle(Pens.Red,20,30,100,150);g.DrawEllipse(Pens.Red,20,30,20,30);}privatevoidbutton1_Click(objectsender,EventArgse){Graphicsg=this.CreateGraphics();g.FillRect

3、angle(Brushes.White,this.ClientRectangle);Fontf=newFont("TimesNewRoman",24);g.DrawString("Traslation",f,Brushes.Black,0,0);g.TranslateTransform(150,75);g.DrawString("Traslation",f,Brushes.Black,0,0);} privatevoidbutton2_Click(objectsender,EventArgse){Graphicsg=t

4、his.CreateGraphics();g.FillRectangle(Brushes.White,this.ClientRectangle);for(inti=1;i<=5;++i){g.DrawRectangle(Pens.Black,10,10,30,50);g.TranslateTransform(2,10);}} privatevoidbutton3_Click(objectsender,EventArgse){Graphicsg=this.CreateGraphics();g.FillRectangle(

5、Brushes.White,this.ClientRectangle);g.DrawEllipse(Pens.Black,20,20,30,50);g.TranslateTransform(-15,0);g.DrawEllipse(Pens.Black,20,20,30,50);g.ResetTransform();g.TranslateTransform(0,30);g.DrawEllipse(Pens.Black,20,20,30,50);} privatevoidbutton4_Click(objectsende

6、r,EventArgse){Graphicsg=this.CreateGraphics();g.FillRectangle(Brushes.White,this.ClientRectangle);Fontf=newFont("TimesNewRoman",24);g.DrawString("Rotation",f,Brushes.Black,0,0);g.RotateTransform(45);g.TranslateTransform(100,10);g.DrawString("Rotation",f,Brushes.

7、Black,0,0);} privatevoidbutton5_Click(objectsender,EventArgse){Graphicsg=this.CreateGraphics();g.FillRectangle(Brushes.White,this.ClientRectangle);Fontf=newFont("TimesNewRoman",16);for(floatangle=0;angle<360;angle+=45){g.ResetTransform();g.TranslateTransform(Cli

8、entRectangle.Width/2,ClientRectangle.Height/2);g.RotateTransform(angle);g.DrawString("HelloWorld",f,Brushes.Red,50,0);}} privatevoidbutton6_Click(objectsender,EventAr

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。