1. Npm : 201243501190
Nama : Reza Fahlevi
Kelas : R7H
Mata Kuliah : Komputer Grafik
Dosen : Nahot Frastian , M.Kom
Program Studi : Teknik Informatika
Universitas : Universitas Indraprasta Pgri
2. Program Komputer Grafik :
- MyOvalSetengah
Input :
import java.awt.Graphics ;
public class myovalsetengah extends java.applet.Applet {
public void paint ( Graphics g ) {
g.drawArc ( 20,20,60,60,90,180 ) ;
g.fillArc ( 120,20,60,60,90,180 ) ;
}
}
3. Proses :
drawArc x1 = 20 ,int y =20, int width = 60 , int height = 60 , int statangle=
90 , int arcangle = 180
fillArc x1 = 120 ,int y =20, int width = 60 , int height = 60 , int statangle= 90
, int arcangle = 180 ., fungsi fillArc untuk membuat Arc berwarna hitam .
Output :