GDDM V3R2 Base Application Programming Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


Aligning text within the text box

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



With the GSTA call, you can use the text-alignment attribute to alter the point on the text box, toward which the text is aligned. This is a typical call:


     GSTA(3,2); /* Align center top of text box with current position*/

Throughout the LABELS subroutine, the text-alignment attribute is allowed to default. The text is therefore aligned such that a point on the text box corresponds with either the point specified in the GSCHAR call, or the current position before a GSCHAP call was issued.

The character direction determines which point on the text box is used as the alignment point. The alignment point is the bottom-left corner of the leftmost character box in the first row of text, if these conditions are met:

  • The graphics window is uniform and has its origin at the bottom left-hand corner of the screen.
    
    
  • The character-angle, -direction, and -shear attributes use the GDDM default values.
    
    
  • The width and height of the character box are both positive values.
    
    

Default alignment points for other character directions are described in the GDDM Base Application Programming Reference book.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012