Go to previous pageGo to next page

1.3.1. Setting the Colour of a Pixel


There is a simple function that sets the colour of a pixel. You only have to specify the coordinates of the pixel and the colour you want to set:

set_pixel (x, y, colour);

The function for setting the colour of a pixel is the simplest function in computer graphics.

In computer graphics not only setting the colour of a single pixel matters but also setting the colour of a particular group of pixels. Drawing shapes such as rectangles etc. and filling them with a particular colour is such an example.
For these and also more complex applications the presented algorithm is too inefficient because it would require considerable processor power and time. Thus higher concepts are necessary, which will be introduced in the following chapters.



Go to previous page
Go to next page