Tag: Graphics

LibGD – Dynamic Image Creation Library

LibGD is an open source Graphics library for the creation of images dynamically by programmers. GD is written in C, and “wrappers” are available for Perl, PHP and other languages. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly. While not restricted to use on the web, the most common applications of GD involve website development. It allows to quickly draw images complete with lines, arcs, text, multiple colors, cut and paste from other images, and flood fills, and write out the result as a PNG or JPEG file.  

Read More

Java Swing GUI Example Program

This Java source code is an example of a Graphical User Interface (GUI) with different GUI elements such as TextBox, Buttons, TextArea, Text Area and Labels. It is implemented using Java Swing API which provides a set of “lightweight” (all-Java language) components. This code example extends the functionality of JFrame class to show a JFrame window and Implements ActionListener on buttons to catch the click event on those buttons.

Read More

Chess – Knight’s Tour Implementation in C++

This C++ program is tour of knight on 64 square of chess board.  The goal is to place a knight on an empty chess board and then move the knight to each of the remaining 63 squares while only visiting each square once.  If on visiting the last square the knight is able to hop to the square on which it first started it is known as a closed tour (and so the knight could resume the exact same sequence of moves to complete another tour) while if the knight is unable to hop to the original square, it is known as an open tour. 

Read More

graphics: graphics.h Header File

This is the graphics.h header file which contains all the graphics functions and their implementations. It is quite nice to have a look at header files just to know more about functions and their parameters. Also it tells about different structures, enums defined in the file for specific purpose.

Read More

Graphical Scientific Calculator with Advance Features

This is a C implementation of basic and few advance scientific features of calculator. It shows a nice graphical UI of the calculator with 3D buttons and demonstrates click button animation functionality. The functionalities of the calculator includes: Basic Mathematics (Add, Subtract, Multiply and Divide), Advance Mathematics (Square root, Square, Cube), Logarithmic Functions (Log, Natural Log (ln), e, Exponential), Number Conversions (Binary, Decimal, Hexadecimal and Octal), Trigonometric Functions (Sine, Cosine, Tangent, Cotangent, Secant and Cosecant), Angle Measurement (Degree, Radia and Gradian), Other Functions (Memory, Pi and Inv).

Read More

Graphics Library (graphics.h) Reference (part 3)

In the previous two posts (Graphics Library Reference part 1 and part 2) I have discussed few important functions of graphics.h library in C Programming. As promised here is the sample C language program which will demonstrate the use of graphics functions using C language and draw some geometrical shapes on the console. If you have followed the previous two posts the you will not find the source code difficult to compile and execute. If you still experience any problems using the source code or compiling the code the please do let me know, and I will try to figure it out.

Read More

Graphics Library (graphics.h) Reference (part 2)

In the previous post I discussed few important functions mostly used to initialize and destroy the graphics mode in DOS environment. Today I will discuss graphics functions to draw different shapes and lines. So here we go by starting the line function which is most important function in creating any graphics.

Read More