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


Polyline

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



The polyline is the fundamental line-drawing primitive. When you enter a series of points to the Polyline (GPL) output function, GKS draws straight lines between the points in the sequence in which you entered them. You can set the following polyline attributes:

  • Polyline type (Set linetype (GSLN))
  • Polyline color (Set polyline color index (GSPLCI))
  • Polyline width scale factor (Set linewidth scale factor (GSLWSC)).
    
    

You choose the polyline color from among the predefined colors your display device supports, or from color representations you define using the Set color representation (GSCR) function. You can find out the number of line types and line width scale factors your device supports by calling Inquire polyline facilities (GQPLF). If the number of line widths returned is 0, the device supports a continuous range of line widths.

GKS supports four line types:


   PICTURE 2         

This example draws a polyline by putting the coordinate information in arrays and calling the Polyline (GPL) output function to connect the points.


          X array = (10.0,25.0,65.0,85.0)
          Y array = (30.0,45.0,50.0,80.0)
          SET LINETYPE (3)
          POLYLINE (4, X array, Y array)

This sequence produces the following output:


   PICTURE 3         

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012