- Back to Home »
- Graphics Programming Dev C++
Posted by :
Pratik Badala
Saturday, 13 February 2016
Even though some peoples somehow managed to port it outside the turbo. Some people hacked their own version of graphics.h. One such person is Micheal main, he ported some of borland graphics functions and library. Micheal main modified BGI library for windows application to be used under MinGW. This BGI library is renamed as WinBGIm. Now you can use all the borland specific functions under Dev-C++.
Using the WinBGIm Graphics Library with Dev-C++
Using the WinBGIm Graphics Library with Dev-C++
Installation Notes:
- Install Dev-C++. I installed from the Version 4.9.9.2 Setup File.
- Download graphics.h to the include/ subdirectory of the Dev-C++ directories.
- Download libbgi.a to the lib/ In order to use the WinBGIm subdirectory of the Dev-C++ directories. Whenever you #include <graphics.h> in a program, you must instruct the linker to link in certain libraries. The command to do so from Dev-C++ is Alt-P. Choose the Parameters tab from the pop-up window and type the following into the Linker area:
-lbgi
-lgdi32
-lcomdlg32
-luuid
-loleaut32
-lole32
#include <graphics.h> int main( ) { initwindow(400, 300, "First Sample"); outtextxy(200,300,"My first Graphics Program in Dev C++..."); while (!kbhit( )) { delay(200); } return 0; }
4. You can now compile and run programs that use the WinBGIm graphics library, such as this one that opens a small window, draws a circle and waits for the user to press a key:
Some Basic Programs Using Graphics
1. Draw a filled rectangle.
2. Draw a rectangle unfilled.
3. Draw concentric circles.
Some Programs Using Graphics
2. Kite Moving
3. Pie Chart Drawing
Some Programs Using Graphics Algorithm
1. Bresenham Line Draw Algorithm With Program.
2. Mid Point Circle's Algorithm With Program.
3. Mid Point Line Draw Algorithm With Program
4. Boundary Fill's Algorithm With Program.
5. Flood Fill Algorithm With Program.
6. Translation Perform on 2D Transformations With Program.
7. Scaling Perform on 2D Transformations With Program.
8. Refletion Perform on 2D Transformations With Program.
9. Shear Perform on 2D Transformations With Program.
10. Rotation Perform on 2D Transformations With Program.
8. Refletion Perform on 2D Transformations With Program.
9. Shear Perform on 2D Transformations With Program.
10. Rotation Perform on 2D Transformations With Program.
into Wallet? Is this problem giving you headache? Are you looking to get rid of it at the earliest? If yes, then contact a representative at Wallet customer service. Dial BlockChain helpdesk number AT-1800-665-6722 where you will be assisted by an elite professional who proactively solves your problems. The team comprises of experienced and knowledgeable professionals who are always available irrespective of the time.
ReplyDelete