Logical Creature

Hey, Sometimes I write Too! Mostly it's about Tech.

Post Page Advertisement [Top]

Graphics using C/C++




The graphics.h header file provides access to a simple graphics library that makes it possible to draw lines, rectangles, ovals, arcs, polygons, images, and strings on a graphical window. The second step is to initialize the graphics drivers on the computer using initgraph method.

The first step in any graphics program is to include graphics.h header file. The graphics.h header file provides access to a simple graphics library that makes it possible to draw lines, rectangles, ovals, arcs, polygons, images, and strings on a
a graphical window.


Click here To Download:    GRAPHICS.H


HOW TO INSTALL EXPLANATION:


CODE


#include
#include
using namespace std;
int main()
{
    int gd=DETECT,gm;
    initgraph(&gd,&gm, "");
    line(150,50,300,50);
    circle(150,50,40);
    circle(150,50,30);
    circle(150,50,20);
    circle(150,50,10);
    circle(300,50,40);
    circle(300,50,30);
    circle(300,50,20);
    circle(300,50,10);
    ellipse(225,150,180,360,60,20);
    getch();
    closegraph();
    return 0;
}


Thank YOU!


No comments:

Post a Comment

Bottom Ad [Post Page]