May 2012
Intermediate to advanced
679 pages
16h 56m
English
When we want to display graphics on the screen, we have to set the screen in graphics mode. The origin in the graphics mode is in the top left corner of the screen. In our programs, we will be using VGAHI mode 2. It supports 640 pixels in the x-direction and 480 pixels in the y-direction. The x and y coordinates start from 0 and end at 639 and 479, respectively. This is shown in Figure 17.1.
Figure 17.1 Graphics screen
Please note that the origin is at the top left corner, x-axis extends towards right and y-axis extends downwards.
Let us write a simple program and study these principles.
Problem: Write ...
Read now
Unlock full access