freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

第7章c圖形程序設(shè)計(jì)基礎(chǔ)-資料下載頁

2024-09-28 15:48本頁面

【導(dǎo)讀】在C#.NET中,使用GDI+處理二維的圖形和圖像,GDI+主要有二維矢量圖形、圖像處理和版式三部分組成。GDI+提供了存儲(chǔ)基元自身相關(guān)信息的類和結(jié)構(gòu)、存儲(chǔ)基元。GDI+為使用各種字體、字號(hào)和樣式來顯示文本這種復(fù)雜任。主要有梯度型畫刷、Matrix類和。畫刷、字體、顏色作為缺省值獲取對(duì)Graphics對(duì)象的引用,注意這種對(duì)象只有在處理當(dāng)前Windows窗口消息的過程中有效;如果想在已存在的窗體或控件上繪圖,可以使用此方法。顏色是進(jìn)行圖形操作的基本要素。取值范圍0~255,0為完全透明,其中,0xff為十六進(jìn)制表示形式。四個(gè)參數(shù)分別表示透明度和R、G、B三色值。畫線始點(diǎn)及終點(diǎn)的樣式等。1)新建一個(gè)Windows應(yīng)用程序,適當(dāng)加寬窗體寬度。2)添加Form1_Paint事件代碼。("藍(lán)色,寬度為",,

  

【正文】 id DrawClosedCurve( Pen, Point[ ], float, FillMode )。 4) public void DrawClosedCurve( Pen, PointF[ ], float, FillMode )。 其中 float型 參數(shù) 指定彎曲強(qiáng)度,該值范圍為 ~ ,超出此范圍會(huì) 產(chǎn)生異常,當(dāng)彎曲強(qiáng)度為零時(shí),就是直線,默認(rèn)張力為 。 例: Pen blackPen = new Pen( )。 Point[ ] p1 = new Point[]{ new Point( 10, 120 ), new Point( 120, 100), new Point( 300,180 ), new Point( 60, 200) }。 ( blackPen, p1 )。 44 10. DrawCurve方法 繪制經(jīng)過一組指定的 Point結(jié)構(gòu)數(shù)組定義的曲線,最后一個(gè)點(diǎn)與第一個(gè)點(diǎn)間不畫線。 1) public void DrawCurve( Pen pen, Point[ ] pts )。 2) public void DrawCurve( Pen pen, PointF[ ] pts )。 3) public void DrawCurve( Pen, Point[ ], float )。 4) public void DrawCurve( Pen, PointF[ ], float )。 其中 float參數(shù)代表曲線彎曲的強(qiáng)度。 例: private void button_Click(object sender, e ) { Graphics g = ( )。 ( )。 Pen blackPen = new Pen( , 3 )。 Point[ ] p1 = new Point[]{ new Point( 10, 120 ), new Point( 120, 100), new Point( 300,180 ), new Point( 60, 200) }。 ( blackPen, p1 )。 } 45 例:繪制直線與平滑曲線 private void Form1_Paint(object sender, e) { Pen redPen = new Pen(, 3)。 Pen greenPen = new Pen(, 3)。 Point[] curvePoints = { new Point( 50, 250), new Point(100, 25), new Point(200, 250), new Point(250, 50), new Point(300, 75), new Point(350, 200), new Point(400, 150) }。 (redPen, curvePoints)。 (greenPen, curvePoints)。 } 46 11. DrawPath方法 路徑通過組合直線、矩形和簡(jiǎn)單的曲線形成的,可通過 Graphics類的 DrawPath方法來繪制整個(gè)路徑的各個(gè)對(duì)象。 public void DrawPath( Pen pen, GraphicsPath path )。 例 : private void button_Click(object sender, e ) { Graphics g = ( )。 GraphicsPath graphPath = new GraphicsPath()。 ( 0, 0, 200, 100 )。 ( new Rectangle( 100, 80, 200, 100 ))。 ( 30, 60, 70, 60, 50, 30, 100, 10 )。 Pen blackPen = new Pen( , 3 )。 ( blackPen, graphPath )。 } 47 12. FillEllipse 該方法用于畫一個(gè)填充橢圓,常用格式有: 1) public void FillEllipse( Brush brush, int x, int y, int width, int height )。 2) public void FillEllipse( Brush brush, RectangleF rect )。 參數(shù)意義: 例 : private void button_Click(object sender, e ) { Graphics g = ( )。 ( )。 Brush sp = new SolidBrush( )。 ( sp, 80, 90, 200, 100 )。 } 48 13. FillRectangle 該方法用于畫一個(gè)填充矩形,常用格式有: 1) public void FillRectangle( Brush brush, int x, int y, int width, int height )。 2) public void FillRectangle( Brush brush, Rectangle rect )。 參數(shù)意義: 例 : private void button_Click(object sender, e ) { Graphics g = ( )。 ( )。 Brush sp = new SolidBrush( )。 ( sp, 80, 90, 200, 100 )。 } 49 14. FillPie 該方法用于畫一個(gè)填充餅圖,常用格式有: 1) public void FillPie( Brush brush, int x, int y, int width, int height , int startAngle, int sweepAngle )。 2) public void FillPie( Brush brush, RectangleF rect, float startAngle, float sweepAngle )。 參數(shù)意義: 例 : private void button_Click(object sender, e ) { Graphics g = ( )。 ( )。 Brush sp = new SolidBrush( )。 ( sp, 80, 90, 200, 100, 60, 300 )。 }
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1