CG-Part3 PPSX
CG-Part3 PPSX
Other fill options include specifications for the edge type, edge
width, and edge color of a region. These attributes are set
independently of the fill style or fill color, and they provide for the
same options as the line-attribute parameters (line type, line width,
and line color). That is, we can display area edges dotted or dashed,
fat or thin, and in any available color regardless of how we have
filled the interior.
CHARACTER ATTRIBUTES:
The appearance of displayed characters is controlled by
attributes such as font, size, color, and orientation. Attributes
can be set both for entire character strings (text) and for
individual characters defined as marker symbols.
There are a great many text options that can be made
available to graphics programmers. First of all, there is the
choice of font (or typeface), which is a set of characters with a
particular design style such as New York, Courier, Helvetica,
London, 'Times Roman, and various special symbol groups.
The characters in a selected font can also be displayed with
assorted underlining styles (solid, dotted, double) in boldface,
in italics. and in outline or shadow styles. A particular font
and associated style is selected in a PHlGS program by
setting an integer code for the text font parameter tf in the
function
setTextFont (tf)
CHARACTER ATTRIBUTES:
Font options can be made available as predefined sets of grid
patterns or as character sets designed with polylines and
spline curves.
Color settings for displayed text are stored in the system
attribute list and used by the procedures that load character
definitions into the frame buffer. When a character string is to
be displayed, the current color is used to set pixel values in
the frame buffer corresponding to the character shapes and
positions.
Control of text color (or intensity) is managed from an
application program with
setTextColourIndex (tc)
where text color parameter tc specifies an allowable color
code.
CHARACTER ATTRIBUTES:
We can adjust text size by scaling the overall dimensions (height and
width) of characters or by scaling only the character width. Character
size is specified by printers and compositors in points, where 1 point is
0.013837 inch (or approximately 1/72 inch). For example, the text you
are now reading is a 10-point font Point measurements specify the size
of the body of a character (Fig. 4-25), but different fonts with the same
point specifications can have different character sizes, depending on
the design of the typeface.
The distance between the bottomline and the topline of the character
body is the same for all characters in a particular size and typeface, but
the body width may vary. Proportionally spaced fonts assign a smaller
body width to narrow characters such as i, j, 1, and f compared to
broad characters such as W or M. Character height is defined as the
distance between the baseline and the capline of characters. Kerned
characters, such as f and j in Fig. 4-25, typically extend beyond the
character-body limits, and letters with descenders (g, j, p, q, y) extend
below the baseline. Each character is positioned within the character
body by a font designer to allow suitable spacing along and between
print lines when text is displayed with character bodies touching.
CHARACTER ATTRIBUTES: