May 2012
Intermediate to advanced
679 pages
16h 56m
English
So far, our programs used screen to output graphics. If the figures involve extensive calculations, there is no point in taxing the computer every time. We should put the (screen) images in a file and store it on the disk. We can use these images in other applications too. In addition, the code to read the image from the disk is very short as compared to creating an image. Therefore, the code will be easy to understand.
Let us write a program to draw faces of a dice.
Problem: Write a program to draw faces of a dice and store them in a file.
Solution: Dice has six faces. They contain dots. Face one has one dot and so on. First, we have to sketch the faces and then we have to mark the locations of the dots. It is ...
Read now
Unlock full access