C Programming Graphics Tutorial
C Programming Graphics Tutorial
1. Line
2. Circle
3. Rectangle
gd - Graphics drive
gm - Graphics mode
r - read
w - write
a - append
Intergraph - initialize the graphics
Program 1:
#include
#include
#include
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"");
clrscr();
circle(200,150,50);
getch();
close graph();
}
Program 2:
#include
#include
#include
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"circle");
clrscr();
set color(2);
rectangle(200,150,50,100);
set color(4);
rectangle(300,200,100,250);
getch();
close graph();
}
Program 3:
#include
#include
#include
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"circle");
clrscr();
set color(2);
line(200,150,50,100);
set color(4);
line(300,200,100,250);
getch();
close graph();
}
1 Comments
https://www.google.com.bn/url?q=https%3A%2F%2Fcodedlist.com%2F
ReplyDeletehttps://www.google.com.bo/url?q=https%3A%2F%2Fcodedlist.com%2F
https://www.google.com.br/url?q=https%3A%2F%2Fcodedlist.com%2F
https://www.google.bs/url?q=https%3A%2F%2Fcodedlist.com%2F
https://www.google.bt/url?q=https%3A%2F%2Fcodedlist.com%2F