The document discusses text and marker attributes in PHIGS programs. Text attributes include font, size, color, orientation and other properties that can be set through functions like setTextFont and setTextColorIndex. Marker attributes include type, size and color that can be set with functions like setMarkerType and setMarkerSizeScaleFactor.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
32 views12 pages
Unit 1
The document discusses text and marker attributes in PHIGS programs. Text attributes include font, size, color, orientation and other properties that can be set through functions like setTextFont and setTextColorIndex. Marker attributes include type, size and color that can be set with functions like setMarkerType and setMarkerSizeScaleFactor.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12
Character Attributes
The appearance of displayed character 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. Text Attributes The choice of font or type face is set of characters with a particular design style as courier, Helvetica, times roman, and various symbol groups. The characters in a selected font also be displayed with styles. (solid, dotted, double) in bold face in italics, and in outline or shadow styles. A particular font and associated stvle is selected in a PHIGS program by setting an integer code for the text font parameter tf in the function setTextFont(tf) 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. Text size can be adjusted without changing the width to height ratio of characters with SetCharacterHeight (ch)
Parameter ch is assigned a real value greater than 0 to
set the coordinate height of capital letters SetCharacterExpansionFactor(cw)
Where the character width parameter cw is set to a
positive real value that scales the body width of character. The orientation for a displayed character string is set according to the direction of the character up vector setCharacterUpVector(upvect) Parameter upvect in this function is assigned two values that specify the x and y vector components. To arrange character strings vertically or horizontally setTextPath (tp) Where the text path parameter tp can be assigned the value: right, left, up, or down Another handy attribute for character strings is alignment. This attribute specifies how text is to be positioned with respect to the $tart coordinates. Alignment attributes are set with setTextAlignment (h,v) where parameters h and v control horizontal and vertical alignment. Horizontal alignment is set by assigning h a value of left, center, or right. Vertical alignment is set by assigning v a value of top, cap, half, base or bottom. A precision specification for text display is given with setTextPrecision (tpr) tpr is assigned one of values string, char or stroke. Marker Attributes A marker symbol is a single character that can he displayed in different colors and in different sizes. Marker attributes are implemented by procedures that load the chosen character into the raster at the defined positions with the specified color and size. We select a particular character to be the marker symbol with setMarkerType(mt) where marker type parameter mt is set to an integer code. Typical codes for marker type are the integers 1 through 5, specifying, respectively, a dot (.) a vertical cross (+), an asterisk (*), a circle (o), and a diagonal cross (X). We set the marker size with setMarkerSizeScaleFactor(ms) with parameter marker size ms assigned a positive number. This scaling parameter is applied to the nominal size for the particular marker symbol chosen. Values greater than 1 produce character enlargement; values less than 1 reduce the marker size. Marker color is specified with setPolymarkerColourIndex(mc) A selected color code parameter mc is stored in the current attribute list and used to display subsequently specified marker primitives .