Lesson 4
Lesson 4
OF
AGRICULTURE & TECHNOLOGY
JKUAT SODeL
Nairobi, Kenya
E-mail: [email protected]
Back Close 0
ICS 2311 Computer Graphics
JKUAT SODeL
©2014
JJ II
J I
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation
Back Close 1
ICS 2311 Computer Graphics
LESSON 4
Raster Displays - details
4.1. introduction
JKUAT SODeL
©2014
JJ II
J I
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation
Back Close 2
ICS 2311 Computer Graphics
4.2. Raster Memory:
Pixmap:
• A pixmap is storage for a whole raster of pixel values.
• Usually a contiguous area of memory, comprising one row
JKUAT SODeL
Back Close 3
ICS 2311 Computer Graphics
pixrect thus typically refers to a series of equal-sized frag-
ments of the memory within a pixmap, one for each row
(or column) of pixels.
concurrent reading.
• Alternatively they can be part of the ordinary fast RAM
of a computer, which allows them to be extensively recon-
figured by software.
JJ II
J I
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation
Back Close 4
ICS 2311 Computer Graphics
JKUAT SODeL
©2014
Defn:
JJ II A frame buffer is a video output device that drives a video
J I display from a memory buffer containing a complete frame of
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation
Back Close 5
ICS 2311 Computer Graphics
data.
The information in the buffer typically consists of color val-
ues for every pixel (point that can be displayed) on the screen.
Color values are commonly stored in:
JKUAT SODeL
• 1-bit monochrome,
• 4-bit palettized,
• 8-bit palettized,
©2014
Back Close 6
ICS 2311 Computer Graphics
the color depth and palette size.
Frame buffers differ significantly from the vector graphics
displays that were common prior to the advent of the frame
buffer.
JKUAT SODeL
Back Close 7
ICS 2311 Computer Graphics
At the same time, the color information for each point on the
screen is pulled from the frame buffer, creating a set of discrete
picture elements (pixels).
Option1: Frame buffer is anywhere in system memory
JKUAT SODeL
©2014
JJ II
J I
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation
Back Close 8
ICS 2311 Computer Graphics
Option2: Permanent place for frame buffer
JKUAT SODeL
©2014
Back Close 9
ICS 2311 Computer Graphics
the frame buffer refresh rate is ussually 60-120hz
Back Close 10
ICS 2311 Computer Graphics
4.3.1. Key Attributes of Raster Displays:
•.1. Major attributes that vary between different raster displays
include the following:
1. ’Colour’: bi-level, greyscale, pseudo-colour, true colour:
JKUAT SODeL
Back Close 11
ICS 2311 Computer Graphics
have been used.
6. Brightness, sharpness, contrast: possibly varying signifi-
cantly with respect to view angle.
7. Speed, interlacing: now usually 50 Hz or more and flicker-
JKUAT SODeL
• Computational features:
Since the 1970s, raster display systems have evolved to offer in-
creasingly powerful facilities, often packaged in optional graphics
accelerator boards or chips.
These facilities have typically consisted of hardware imple-
JJ II mentation or acceleration of computations which would other-
J I wise be coded in software, such as:
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation
Back Close 12
ICS 2311 Computer Graphics
Raster-ops: fast 2D raster-combining operations explained
next;
2D scan conversion, i.e. creating raster images required by
2D drawing primitives such as:
JKUAT SODeL
Back Close 13
ICS 2311 Computer Graphics
area.
Back Close 14
ICS 2311 Computer Graphics
the corresponding bit in a congruent source pixrect S.
• Or S may be a bitmap; then the same source bit is applied
with each bit of a destination pixel.
There are 16 possible ’logical functions’ (boolean operators) which
JKUAT SODeL
may be used,
The functions commonly used are 0 (clear), 3 (copy), 6 (xor),
a (invert) and f (set), especially copy.
©2014
Back Close 15
ICS 2311 Computer Graphics
moving object.
The basic raster-op scheme is often extended as follows:
• By the use of a clip mask to distinguish between desti-
nation pixels the raster-op affects and destination pixels
JKUAT SODeL
Back Close 16
ICS 2311 Computer Graphics
• Thus pixmaps with n-bit pixel values can be treated as
having n different ’bit-planes’.
– For example an 8-bit-pixel pixmap can be used to
hold two 4-bit-pixel images or four 2-bit-pixel images.
JKUAT SODeL
3D effects.
Multiple window user interfaces make extensive use of raster-
ops.
• The X window system has long done this with particu-
lar efficiency, both in using raster-ops in conjunction with
JJ II advanced repainting algorithms and in making raster-op
J I functionality accessible to applications programmers.
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation
Back Close 17
ICS 2311 Computer Graphics
Revision Questions
Back Close 18
ICS 2311 Computer Graphics
8-bit palettized,
16-bit highcolor and
24-bit truecolor formats.
.
JKUAT SODeL
Exercise 1. ...
©2014
JJ II
J I
J DocDoc I
JKUAT: Setting trends in higher Education, Research and Innovation
Back Close 19