Attributesofoutputprimitives ch4
Attributesofoutputprimitives ch4
Primitives
Attributes of Output
Primitives
Contents :
Definition
Line Attribute
Curve Attribute
Color and Grayscale Level
Area Filled Attribute
Text and Characters
Introduction
The way a primitive is to be displayed is referred to as an
Attribute Parameter.
setLineWidthScaleFactor(lw);
miter join
round join
beveI join.
A miter join is accomplished by
extending the outer boundaries of
each of the two lines until they
meet.
and pattern.
Line Color
A polyline routine displays a line in the current
color by setting this color value in the frame
buffer at pixel locations along the line path
using the setpixel procedure. The number of
color choices depends on the number of bits
available per pixel in the frame buffer.
We set the line color value in PHlCS with the
function
CURVE ATTRIBUTES
Parameters for curve attributes are the same as
those for line segments. We can display curves
with varying colors, widths, dotdash patterns,
and available pen or brush options. Methods
for adapting curve-drawing algorithms to
accommodate attribute selections are similar
to those for line drawing.
COLOR AND GRAYSCALE LEVELS
General purpose raster-scan systems, usually provide
a wide range of colors, while random-scan monitors
typically offer only a few color choices, if any.
20
COLOR
Direct
21
COLOR
Indirect
22
COLOR
Exercise:
What is the size of frame buffer required for the following
cases:
Conclusion
CLUT is good for storage but cant give a very high resolution
picture.
23
COLOR Lookup Table
24
COLOR Lookup Table
25
A minimum number of colors can be provided
in this scheme with 3 bits of storage per pixel,
as shown in Table.
Grayscale
With monitors that have no color capability,
color functions can be used in an application
program to set the shades of gray, or
grayscale, for displayed primitives.
00111000
01101100
11000110
11000110
11111110
11000110
11000110
00000000
33
CHARACTER ATTRIBUTES
vertical alignment.
setMarkerSizeScaleFactor (ms)