2 SUMMARY OF SGS CALLS

Control

SGS_OPEN(WKSTN, IZONID, ISTAT)
Open SGS & GKS, opening and activating one workstation.

SGS_INIT(LUN, ISTAT)
Open SGS & GKS, without opening a workstation.

SGS_CLOSE
Shut down SGS & GKS.

SGS_OPNWK(WKSTN, IZONID, ISTAT)
Open a new workstation and select it.

SGS_CLSWK(IZONID, ISTAT)
Close a workstation.

SGS_WLIST(LUN)
Output a list of available workstations.

SGS_SPEN(NPEN)
Select pen for line and text drawing.

SGS_IPEN(NPEN)
Inquire current pen number.

SGS_FLUSH
Complete all pending output.

SGS_ISLER(BLKER)
Inquire whether device has selective erase capability.

SGS_CLRFG(ISTATE)
Set or clear ‘clear display on open’ flag.

Zones

SGS_ZONE(X1, X2, Y1, Y2, IZONID, ISTAT)
Create and select a zone of the specified extent.

SGS_ZSHAP(AR, POS, IZONID, ISTAT)
Create and select a zone of the specified aspect ratio.

SGS_ZSIZE(XM, YM, POS, IZONID, ISTAT)
Create and select a zone of the specified size.

SGS_ZPART(NX, NY, IZONES, ISTAT)
Partition current zone into NX by NY pieces.

SGS_SW(X1, X2, Y1, Y2, ISTAT)
Set window of current zone to given bounds.

SGS_SELZ(IZONID, ISTAT)
Select another zone.

SGS_RELZ(IZONID)
Release the specified zone.

SGS_CLRZ
Clear the current zone (even if this means clearing the whole display surface).

SGS_ICURZ(IZONID)
Inquire ID of current zone.

SGS_IZONE(X1, X2, Y1, Y2, XM, YM)
Inquire window bounds for the current zone, and its size on the display surface.

SGS_IDUN(DXW,DYW)
Inquire the plotting resolution of the current zone.

SGS_TPZ(IZIN, XIN, YIN, IZOUT, XOUT, YOUT, ISTAT)
Transform position from one zone to another.

SGS_BZNDC(X1, X2, Y1, Y2, POS, ISTAT)
Set the NDC extent of a base zone.

Plotting Lines

SGS_BPOLY(X, Y)
Begin a new polyline.

SGS_APOLY(X, Y)
Append a new line to the polyline.

SGS_OPOLY
Output the polyline.

SGS_IPLXY(X, Y)
Inquire end of current polyline.

SGS_LINE(X1, Y1, X2, Y2)
Begin a new polyline with a single line.

SGS_BOX(X1, X2, Y1, Y2)
Draw a rectangle.

SGS_CIRCL(X, Y, R)
Draw a circle.

SGS_ARC(X, Y, R, THETA1, THETA2)
Draw an arc of a circle.

SGS_CLRBL(X1, X2, Y1, Y2)
Clear a rectangular area (if this can be done without affecting the rest of the display surface).

Plotting Text

SGS_BTEXT(X, Y)
Begin a new text string.

SGS_ATEXT(STRING)
Append text to the current string.

SGS_OTEXT
Output the text string.

SGS_ATXI(I, NFI)
Format an integer onto the current text string.

SGS_ATXR(R, NFI, NDP)
Format a real number onto the current text string.

SGS_ATXL(STRING)
Append text to the current text string omitting trailing blanks.

SGS_ATXB(STRING, NSPACE)
Append right justified field to the current text string.

SGS_TX(X, Y, STRING)
Begin a new text string with a string.

SGS_TXI(X, Y, I, NFI)
Begin a new text string with a formatted integer.

SGS_TXR(X, Y, R, NFI, NDP)
Begin a new text string with a formatted real number.

SGS_ITXB(X, Y, N, DX, DY)
Inquire status of current text string.

Plotting Markers

SGS_MARK(X, Y, MTYPE)
Draw a single marker.

SGS_MARKL(MTYPE)
Draw marker at current end of polyline.

Attributes of Characters

SGS_SFONT(NF)
Select text font.

SGS_SPREC(NPR)
Specify text precision.

SGS_SHTX(HT)
Specify character height.

SGS_SARTX(AR)
Specify text aspect ratio.

SGS_SUPTX(XU, YU)
Specify character orientation.

SGS_SSPTX(SP)
Specify character spacing.

SGS_STXJ(TXJ)
Specify text alignment.

SGS_ITXA(NF, NPR, HT, AR, XU, YU, SP, TXJ)
Inquire text attributes.

Input

SGS_CUVIS(VIS)
Set visibility of cursor.

SGS_DEFCH(CHOSTR)
Define valid choice keys.

SGS_DISCU
Disable sample mode for cursor.

SGS_ENSCU
Enable sample mode for cursor.

SGS_ICUAV(AVAIL)
Inquire cursor availability.

SGS_INCHO(NCHDEV, N)
Inquire number of choices.

SGS_REQCH(N)
Request choice.

SGS_REQCU(X, Y, N)
Request cursor position.

SGS_SAMCU(X, Y)
Sample cursor position.

SGS_SELCH(NCHDEV)
Select choice device.

SGS_SETCU(X, Y)
Set cursor position.

GKS Inquiries (described in Appendix B)

SGS_ICURW(IWKID)
Inquire workstation ID for the current zone.

SGS_WIDEN(WKSTN, IWTYPE, ICONID, ISTAT)
Translate workstation name to GKS type and connection ID.

SGS_WNAME(ROUTIN, I, ISTAT)
Get list of workstation names.