1 / 7

CG プログラミング論

CG プログラミング論. 平成 26 年 4 月 14 日 森田 彦. ⑤. Color.red. public void paint(Graphics g) { g.setColor(Color.green); g.fillRect( 30 ,60 , 150 , 80 ); }. ①. ②. ③. ④. (30,60). (180,140). 【 基礎課題 1-1 】 の解答 . w=180-30=150. g.fillRect(x,y, w , h );. h=140-60=80. jPanel1. jPanel2.

kailey
Télécharger la présentation

CG プログラミング論

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CGプログラミング論 平成26年4月14日 森田 彦

  2. Color.red publicvoid paint(Graphics g) { g.setColor(Color.green); g.fillRect( 30 ,60 , 150, 80); } ① ② ③ ④ (30,60) (180,140) 【基礎課題1-1 】の解答  w=180-30=150 g.fillRect(x,y,w,h); h=140-60=80

  3. jPanel1 jPanel2 void jButton1_actionPerformed(ActionEvent e) { ・・・ gb.drawLine(30,30,100,80); ga.fillRect(10,10,50,50); ・・・ } ① ② 【基礎課題1-2 】の解答  ga gb

  4. 本日の学習内容 再描画処理 • 先週までのCG作成方法では、一度作成したCGが画面から消えてしまった場合、再び描画しない限り回復されません。 • そこで、必要に応じて(自動的に)CGを再描画する様にプログラムを改良します。 • その手法を学ぶことが本日の学習内容です。(「プログラミング」テキストの8-7節参照) 例1 例2

  5. 本日の提出課題 • 【基礎課題1-3】(先週配布)~【基礎課題1-6】の4題です。 ※ 先週【基礎課題1-3】を提出した人は【基礎課題1-4】からの提出で結構です。 • プリントをよく読んで課題を解き、(プリントの)指示に従って課題を提出して下さい。 • 演習課題は相談し合って解いて結構です。 • 次週はテキストの【応用課題8-3-C】(p.208:2012)に関連した内容を学習します。

  6. 演習課題の受け取りについて(再) • 原則として講義時間内に提出してもらいます。提出が遅れた場合は以下のように減点とします。 基礎課題 応用課題 課題内容によっては、上の基準を緩和します。その際は講義時にアナウンスします。

  7. 課題提出時の件名 • 下のように学籍番号(半角)、氏名、課題日付を指示通り記入して下さい。 <件名> S120010 学院太郎 CG課題4/14 <宛先> hiko@e.sgu.ac.jp

More Related