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


Querying the current position, using GSQPOS

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



After the GSARC call at the place marked G , the current position is at the end point of the arc. Because the arc is not drawn to a specified end point, the current position is not known. This would not be a problem, if the program needed to draw the next primitive at some other point. (A GSMOVE call could take the current position to that point and drawing could recommence.) However, the next primitive needs to be a horizontal line following on from the end point of the arc, so the current position must be determined.

At H in Figure 6 in topic 2.1, the GSQCP call queries the x and y coordinates of the current position and assigns them into the variables X1 and Y1. Only the x coordinate need then be changed to be used as the end point of a horizontal line.

After this call, the current position is still unknown, but it is not needed for the GSARC call drawing an arc concentric with the first one.

GSQCP, which you can use to determine the current position, is one of the many very useful query calls provided by the GDDM API. They are denoted by the letter "Q" in their call names. Some of the others are described in later topics of this book. All query calls are described in detail in the GDDM Base Application Programming Reference book.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012