https://github.com/psingh12354/cpp-gui
https://github.com/psingh12354/cpp-gui
car circle cpp cpp-gui gui line moving triangle
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/psingh12354/cpp-gui
- Owner: Psingh12354
- License: gpl-3.0
- Created: 2020-07-22T08:31:29.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-02T09:52:59.000Z (over 4 years ago)
- Last Synced: 2025-01-02T20:43:56.986Z (5 months ago)
- Topics: car, circle, cpp, cpp-gui, gui, line, moving, triangle
- Language: C++
- Homepage:
- Size: 40 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
GUI
Check some Basix C++ graphic program here
- **Make Body**
```
#include
#include
#include
void main()
{
int graphicdrive,graphicmode;
graphicdrive=DETECT;
initgraph(&graphicdrive,&graphicmode,"");
closegraph();
getch();
}
```- **Arc**
```
#include
#include
#include
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"");
arc(150,150,0,180,100);
getch();
closegraph();
}
```
- **Circle**
```
#include
#include
#include
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"");
circle(100,100,50);
getch();
closegraph();
}
```
- **Color**
```
#include
#include
#include
void main()
{
clrscr();
int d=DETECT,m;
initgraph(&d,&m,"");
setbkcolor(5);
setcolor(1);
settextstyle(1,0,5);
outtextxy(75,8,"India");
setcolor(15);
settextstyle(1,1,15);
outtextxy(75,40,"Gorakhpur");
getch();
closegraph();
}
```
- **Positioning**
```
#include
#include
#include
void main()
{
int gd,gm;
gd=DETECT;
initgraph(&gd,&gm,"")
outtext("Priyanshu Singh");
moveto(300,300);
outtext("Position Change");
closegraph();
getch();
}
```
- **Rectangle**
```
#include
#include
#include
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"");
rectangle(50,100,200,300);
getch();
closegraph();
}
```
- Triangle
```
#include
#include
#include
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"");
line(140,290,50,450);
line(140,290,230,450);
line(50,450,230,450);
getch();
closegraph();
}
```
- Pixel
```
#include
#include
#include
int main()
{
int gd=DETECT,gm,color;
initgraph(&gd,&gm,"");
putpixel(50,40,RED);
getch();
closegraph();
return 0;
}
```Thank You