Raster 1
Raster 1
Raster-graphics systems are essential for creating and displaying images on screens. These
systems involve multiple processing units working together. The central processing unit
(CPU) gets help from a special processor called the video controller or display controller,
which manages the display device and keeps the screen updated by accessing the frame
buffer.
Video Controller
In a typical raster system, a portion of the system memory is set aside for the frame buffer.
The video controller can access this memory directly. Screen positions and frame-buffer
locations are organized using Cartesian coordinates. Application programs use graphics
software to set the positions of displayed objects based on this coordinate system.
The origin of the coordinate system is usually at the lower-left corner of the screen, but it can
be placed anywhere that's convenient. The screen surface represents the first quadrant of a
two-dimensional system: positive x values go from left to right, and positive y values go from
bottom to top. Pixel positions are given integer x values (from 0 to the maximum width) and
y values (from 0 to the maximum height).
Refresh Operations
To keep the screen image stable, the video controller constantly refreshes the display. It starts
at the top-left corner of the screen, setting the x register to 0 and the y register to the top scan
line value. It retrieves the pixel value from the frame buffer and sets the CRT beam's
intensity. Then, it moves one pixel to the right (incrementing the x register) and repeats the
process across the top scan line.
After finishing the top line, the x register resets to 0, and the y register moves down to the
next scan line. This process continues for each scan line until the bottom of the screen. Then,
the video controller resets to the top and starts over. To keep up with the necessary refresh
rate of at least 60 frames per second, the video controller can handle multiple pixel values at
once, speeding up the process.
Scan Conversion
Scan conversion translates geometric shapes, like lines, into pixel positions in the frame
buffer. For example, to convert a line, the system finds the closest pixel positions along the
line's path and stores the color for each position in the frame buffer. Characters can be
defined using rectangular grids or outlines, which are then converted into pixels in the frame
buffer.