Showing posts with label Graphics in C. Show all posts
Showing posts with label Graphics in C. Show all posts

Wednesday, October 13, 2010

Graphics in C Language Tutorial

,


C and C++ Very Useful Language for Creating Application and programs. It provide a platform for developing a application with many functionality. But we know that mostly users attract Interface design. Design of application gives easy to use for users, he can user any application easily by UI. All programmings language can easily implement with graphic eg: C,C++,PHP,.net etc. Here we are learning about Graphic in C language with example, graphics.h library is used for create GUI (Graphic User Interface).
Learn with below example :


#include <stdio.h>
#include <conio.h>
#include <graphics.h>


void main()
{
  int gd=DETECT,gm;
  clrscr();
  initgraph(&gd,&gm,"..\bgi");
  putpixel(100,100,WHITE);
  line(50,50,150,150);
  rectangle(200,200,400,400);
  closegraph();
  getch();
}
Read more →