Introduction to C/C++ graphics
Introduction
C Graphics is a very interesting thing and you will enjoy a lot while doing these programs.
This tutorial is for all those who wish to learn c graphics programming, no prior knowledge of graphics concepts is required. However u should have knowledge of C concepts like :
-Variables
-Operators--mainly assignment, comparison
-Loops--for, while, do-while
-Conditional statements--if,if-else,nested if etc
-Functions
You can use graphics programming for developing your own games, in projects, for animation etc.
It's not like traditional C programming in which you have to apply complex logic in your program and then you end up with a lot of errors and warnings in your program.
In C graphics programming you have to use standard library functions to get your task done. Just you pass arguments to the functions and it's done.
You can create different objects like circle,rectangle,ellipse,arc,3-d bars,2-d bars,line and many others.
You can also change the text fonts, its directions.
C language has various colors having values 0 to 15 , you can also use these colors in
graphics and most intersetingly you can use these colors to fill circle,ellipse etc and to make simple animations.
You can create graphics projects which seems to be very new and different from simple ones.
Graphics provides the color effects to the program's output which is very interesting.
To initialize graphics mode we use initgraph function in our program. initgraph function is present in "graphics.h" header file, so your every graphics program should include "graphics.h" header file.
Have fun........!!!!!!!!!!
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment