Ellipse & Sector in Graphics.h
Linux - Libgraph - Graphics & Multimedia Lab - C++ Program
- ellipse( x0, y0, start_angle, end_angle, x_axis, y_axis)
- sector( x0, y0, start_angle, end_angle, x_axis, y_axis)
Source code:
#include<graphics.h>
using namespace std;
int main()
{
int gd=DETECT, gm;
initgraph(&gd, &gm,NULL);
outtextxy(150,15, "Ellipse & Sector in Graphics.h");
ellipse(150,150,0,360,100,50);
outtextxy(201,201, "Ellipse");
sector(300,300,0,270,100,50);
outtextxy(405, 351, "Sector");
getch();
closegraph();
return 0;
}
Output:
nn@linuxmint ~ $ g++ g3.cpp -lgraph g3.cpp: In function ‘int main()’: g3.cpp:11: warning: deprecated conversion from string constant to ‘char*’ g3.cpp:15: warning: deprecated conversion from string constant to ‘char*’ g3.cpp:18: warning: deprecated conversion from string constant to ‘char*’ nn@linuxmint ~ $ ./a.out a.out: ../../src/xcb_io.c:249: process_responses: Assertion `(((long) (dpy->last_request_read) - (long) (dpy->request)) <= 0)' failed. nn@linuxmint ~ $







0 comments:
Post a Comment