Sun Microsystems 800-1256-04 — Sun Microsystems 800-1256-04 SunCGI Reference Manual PDF

Chapter 4 -Attributes 73 0 valid horizontal alignments. typedef en\llTI LFT, CNTER, RGHT, NRMAL, CNT Chaligntype; If the value of halign is LFr, the horizontal position of the text will begin at the left edge of the box enclosing the text. Similarly, if the value of halign is RGl:IT, the horizontal position of the text will begin at the right edge of the box enclos- ing the text. If the value of halign is CNTER the horizontal position of the text will begin equidistant from the right and the left edges of the text box. NRMAL assigns the alignment based on the value of the character path (see Table 4-4).

If the value of halign is CNT (continuous) the horizontal position of the text is determined by the argument hcalind. In this case, the text will begin hcalind fraction of the width of the text box from the left edge of the character box. The default value of halign is NRMAL valign specifies where the character is placed in relation to they component.of the text position. The enumerated type Cvaligntype contains values that correspond to valid vertical alignments. 0 typedef en\llTI TOP, CAP, HALF, BASE, BOTTOM, NORMAL, CONT Cvaligntype; If the value of valign is TOP, the vertical position of the text will begin at the top edge of the character box.

If the value ofvalign is CAP, the vertical position of the text will begin at the cap line of the character.13 Simill\l"ly, if the value of valign is BOITOM, the vertical position of the text will begin at the bottom edge of the character box. If the value of valign is BASE, the vertical position of the text will begin at the baseline of the character.14 If the value of valign is HALF the vertical position of the text will begin equidistant from the top and the bottom edges of the character box. NORMAL assigns the alignment based on the value of.. the character path (see Table 4-4).

If the value of valign is assigned to CONT (continuous), the vertical position of the text is determined by the argument vcalind and will begin vcalind fraction of the height of the character box from the bottom edge of the character box. The default value of valign is NORMAL 13 The cap liM ii defined u the inviaJ.'ble line eoneaponding to tbe top of die average chuxler within a font. 0 14 The btudiM is defined u the invisible line corresponding to the bottom of the average character within a fo!ll. The ba,,lin, does Dot neceuarily correspond to the bottan of a character. For enmple, a the tail of a lower.,case g ex.tends below the baseline. Version C of 17 March 1986