GDDM-GKS V1R1 Programming Guide and Reference
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


Text

GDDM-GKS V1R1 Programming Guide and Reference
SC33-0334-00



A text primitive is a string of characters. You provide the characters to be used, and the starting point in world coordinates. You can set the following text attributes:

  • Text color index (Set text color index (GSTXCI))
  • Text font and precision (Set text font and precision (GSTXFP))
  • Character height (Set character height (GSCHH))
  • Character up vector (Set character up vector (GSCHUP))
  • Text alignment (Set text alignment (GSTXAL))
  • Text path (Set text path (GSTXP)).
    
    
You choose the text color from among the predefined colors your display device supports, or from color representations you define in the Set color representation (GSCR) function. When you choose a text font, you choose among device-dependent alternatives. You can find the number of available text fonts, and the minimum and maximum character heights supported by your device, by calling the Inquire text facilities (GQTXF) function.

The character up vector is a line from the origin (0,0) to a point in world coordinates, and it establishes an up direction for text characters. You set this attribute with the function Set character up vector (GSCHUP). The following illustration shows the text strings displayed with eight different character up vectors.


   PICTURE 8         

When you set text alignment, you specify both horizontal and vertical alignment values. You set this attribute with the function Set text alignment (GSTXAL). Here, the string "input" is displayed at the text alignment positions supported by GDDM-GKS.


   PICTURE 9         

This example displays the string "critical" centered at the top of the arrow from the previous example.


          SET TEXT ALIGNMENT (2,1)
          TEXT (25.0, 68.0, 'critical')

This sequence produces the following output:


   PICTURE 10          

Setting the text path specifies the position (right, left, up, or down) of each character in the string relative to the preceding character.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012