GrWin Graphics Library

Version 1.1.3


Copyright (C) 1998 - 2022 by TAMARIBUCHI, Tsuguhiro

tamari@grwin.com

https://grwin.securesite.jp/grwin/en/

Table of contents

# Fortran C Function n
1. gwinit GWinit Initialize 0
1. gwinitx GWinitx Initialize 0
2. gwopen GWopen Open Window 1
2. gwopenx GWopenx Open Window 1
3. gwquit GWquit Quit 0
3. gwquitx GWquitx Quit 0
4. gwleave GWleave Leave 0
5. gwjoin GWjoin Join in a Window 0,2
6. gwreset GWreset Reset Parameters 1
7. gwclose GWclose Close Window 0
8. gwindow GWindow Set World Coordinate System 0
9. gwgetwn GWgetwn Get World Coordinate System 0
10. gwvport GWvport Set View Port 0
11. gwport GWport Set View Port (in the world coordinate) 0
12. gwgetvp GWgetvp Get View Port 0
13. gwsavevp GWsavevp Save View Port Info 0
14. gwselvp GWselvp Select View Port 0
15. gwfirst GWfirst Get Window / First 0
16. gwnext GWnext Get Window / Next 0
17. gwselect GWselect Select Window 0
18. gwshowwn GWshowwn Set Window's Show State 0
19. gwshowfr GWshowfr Set Frame's Show State 0
20. gwarrange GWarrange Arrange Windows 0
21. gwldcpos GWldcpos Get Position in LDCS 0
22. gwldcsiz GWldcsiz Get Sise in LDCS 0
23. gwpxlsiz GWpxlsiz Retrieve Pixel Sise in WCS 0
24. gwsetpen GWsetpen Set Pen Attributes 1
25. gwgetpen GWgetpen Get Pen Attributes 0
26. gwsetbrs GWsetbrs Set Brush Attributes 1
27. gwgetbrs GWgetbrs Get Brush Attributes 0
28. gwsettxt GWsettxt Set Text Font Attributes 1
29. gwgettxt GWgettxt Get Text Extent 0
30. gwputtxt GWputtxt Draw Text String 1
31. gwsetsym GWsetsym Set Symbol Font Attributes 1
32. gwgetsym GWgetsym Get Symbol Extent 0
33. gwputsym GWputsym Draw Symbol 1
34. gwsetmsg GWsetmsg Status Bar 0
35. msgbox* GWmsgbox Message Box 0
36. gwgetpos GWgetpos Pen Position 0
37. gwmove2 GWmove2 Move Pen 1
38. gwline2 GWline2 Draw Line To 1
39. gwline GWline Draw Line 2
40. gwrect GWrect Draw Rectangle 1
41. gwsrect GWsrect Draw Rectangle Filled with Solid Color 1
42. gwrrect GWrrect Draw Round Rectangle 1
43. gwellipse GWellipse Draw Ellipse 1
44. gwarc GWarc Draw Arc 1
45. gwchord GWchord Draw Closed Arc 1
46. gwpie GWpie Draw Pie 1
47. gwplot1 GWplot1 Plot 1D Array Elements x
48. gwpolygon GWpolygon Draw Polygon 1
49. gwpolylin GWpolylin Draw Line Segments 1
50. gwbezier GWbezier Draw Bezier 1
51. gwflood GWflood Fill Bounded Area 1
52. gwclear GWclear Clear Window 1
53. gwsetmrk GWsetmrk Set Mark Attributes 1
54. gwputmrk GWputmrk Draw Mark 1
55. gwgetmrk GWgetmrk Get Mark Attributes 0
56. gwmrkpen GWmrkpen Set Attributes of Mark Pen 1
57. gwmrkbrs GWmrkbrs Set Attributes of Mark Brush 1
58. gwsetxfrm GWsetxfrm Set Transformation Matrix 1
59. gwgetxfrm GWgetxfrm Get Transformation Matrix 0
60. gwsetrgn GWsetrgn Set Clipping Region 1
61. gwsetpxl GWsetpxl Set Pixel 1
62. gwgetpxl GWgetpxl Get Pixel 0
63. gwcolor GWcolor Set Color 1
64. gwgetrgb GWgetrgb Get RGB 0
65. krgb* GWkrgb Set RGB 0
66. kcolor* GWkcolor Get COLORREF value 0
67. igwcolor* GWgetcolor Get COLORREF value 0
68. gwncolor GWncolor Get Max Index of the Palette 0
69. gwsavecc GWsavecc Save Custom Color 0
70. gwloadcc GWloadcc Load Custom Color 0
71. gwsysclr GWsysclr Get System Color 0
72. gwpalette GWpalette Create Custom Palette 0
73. gwpoffset GWpoffsetl Offset Custom Palette 0
74. gwcappnt GWcappnt Capture Point 0
75. gwcapvec GWcapvec Capture Vector 0
76. gwcaplin GWcaplin Capture Line 0
77. gwcaprect GWcaprect Capture Rectangle 0
78. gwloadbmp GWloadbmp Load Bitmap 0
79. gwsavebmp GWsavebmp Save Bitmap 0
80. gwmakebmp GWmakebmp Make Bitmap 0
81. gwpeekbmp GWpeekbmp Peek Bitmap Data 0
82. gwpokebmp GWpokebmp Poke Bitmap Data 0
83. gwfnt2bmp GWfnt2bmp Make Bitmap from Font 0
84. gwsetbmp GWsetbmp Set Bitmap Attributes 0
85. gwgetbmp GWgetbmp Get Bitmap Attributes 0
86. gwputbmp GWputbmp Draw Bitmap 1
87. gwcopybmp GWcopybmp Copy Registered Bitmap 0
88. gwdelbmp GWdelbmp Delete Bitmap 0
89. gwcapimg GWcapimg Capture Image 0
90. gwclipimg GWclipimg Copy To Clipboard 0
91. gwloademf GWloademf Load Metafile 0
92. gwsaveemf GWsaveemf Save EMF as File 0
93. gwemfmrk GWemfmrk Create Mark as EMF 0
94. gwbeginemf GWbeginemf Begin Making an EMF 0
95. gwendemf GWendemf End Making an EMF 0
96. gwputemf GWputemf Draw EMF 1
97. gwgetemf GWgetemf Get Attributes of EMF 0
98. gwcopyemf GWcopyemf Copy Registered EMF 0
99. gwdelemf GWdelemf Delete EMF 0
100. gwinput GWinput Input String 0
101. gwfiledlg GWfiledlg Popup File Dialog 0
102. gwload GWload Load Data 0
103. gwsaveas GWsaveas Save Data 0
104. gwprint GWprint Print 0
105. gwsetogn GWsetogn Set Object-Group Number 0
106. gwanchor GWanchor Anchor 1,-x
107. gwsetbk GWsetbk Set Background x
108. gwerase GWerase Erase -x
109. gwflush GWflush Flushing -x
110. gwrefresh GWrefresh Refresh 0
111. gwvwmod GWvwmod View Mode 0
112. gwmode GWmode Setting and Inquiring Modes 0
113. gwkybrd GWkybrd Get Keyboard Status On Window 0
114. gwmouse GWmouse Get Mouse Status 0
115. gwtimer GWtimer Interval Timer 0
116. gwevent GWevent Get Event Status 0
117. gwidle GWidle Idling 0
118. gwidle2 GWidle2 Idling 2 0
119. gwsleep GWsleep Sleep 1
120. gwsleep2 GWsleep2 Sleep 2 1
121. gwctime GWctime Get Current time 0
122. gwticks* GWtics Get Aspect Ratio 0
123. gwpause GWpause Pause 0
124. gwsize GWsize Get/Set Size 0
125. gwaspect* GWaspect Get Aspect Ratio 0
126. gwfmax* GWfmax Maximum value of Floating Point Numbers 0
127. gwversion GWversion Get Version Numbers 0
128. kbhit* kbhit Get Keyboard Status On Console 0
129. kbgetch* kbgetch Get a Key Code On Console 0
130. gwtspawn GWTspawn Tortoise: Create 0
131. gwdtturn GWTturn Tortoise: Turn 1
131. gwdtturn GWDTturn Tortoise: Turn 1
132. gwdtforward GWTforward Tortoise: Move Forward 1
132. gwdtforward GWDTforward Tortoise: Move Forward 1
133. gwdtshift GWTshift Tortoise: Displace 1
133. gwdtshift GWDTshift Tortoise: Displace 1
134. gwdtmove2 GWTmove2 Tortoise: Move To 1
134. gwdtmove2 GWDTmove2 Tortoise: Move To 1
135. gwtclone GWTclone Tortoise: Copy 0
136. gwtremove GWTremove Tortoise: Remove 0
137. gwdtsetpos GWTsetpos Tortoise: Set Position 1
137. gwdtsetpos GWDTsetpos Tortoise: Set Position 1
138. gwdtgetpos GWTgetpos Tortoise: Get Position 0
138. gwdtgetpos GWDTgetpos Tortoise: Get Position 0
139. gwdtsetdir GWTsetdir Tortoise: Set Direction 1
139. gwdtsetdir GWDTsetdir Tortoise: Set Direction 1
140. gwdtgetdir GWTgetdir Tortoise: Get Direction 0
140. gwdtgetdir GWDTgetdir Tortoise: Get Direction 0
141. gwtsetcol GWTsetcol Tortoise: Set Color 1
142. gwtgetcol GWTgetcol Tortoise: Get Color 1
143. gwtsetpen GWTsetpen Tortoise: Set Pen Attributes 1
144. gwdtsetmrk GWTsetmrk Tortoise: Set Mark Attributes 1
144. gwdtsetmrk GWDTsetmrk Tortoise: Set Mark Attributes 1
145. plots None Initialize (Calcomp compatible) 0
146. plote None Quit (Calcomp compatible) 0
147. plot None Draw Line To/Move Pen (Calcomp compatible) 1
148. window None Set World Coordinate System (Calcomp compatible) 0
149. newpen None New Pen (Calcomp compatible) 1
150. symbol None Draw Character String (Calcomp compatible) 1
151. number None Draw Numeric Value (Calcomp compatible) 2
152. gcls None Erase Window (Calcomp compatible) 0


grwin.exe uses an internal coordinate system, the logical device coordinate system (LDCS), fixed on the entire drawing rectangle, the paper, defined on opening a window. In the LDCS, a point on the paper is specified by [u,v] with u to the right and v to the bottom from the origin at the top-left. On printing, the unit lengths in the LDCS are mapped to the unit pixel lengths of the printer.

The normalized logical coordinate system (NLCS) is used to define a view port, a temporal drawing rectangle set inside the paper, by calling GWVPORT. The unit in the NLCS is determined by normalizing the width and the height of the paper in the LDCS with the same fraction to give the unit length of the shorter of the width and the height. The origin of the NLCS is at the bottom-left of the paper.

The world coordinate system (WCS) is the user's coordinate system defined by calling GWINDOW to give the coordinates of the bottom-left and the top-right corners of the view port in this coordinate system. Almost all routines of the GrWin Library assume this world coordinate system.

In each of the following items of this manual, [F] stands for a declaration in Fortarn, and [C] in C.

In Fortran, there is no need to use capital letters as in the body of this manual below, since a capital letter and the corresponding small letter are not distinguished at all in Fortran except in character constants, and in contrast, of course, they are distinguished in C. As seen in the above table each of all subroutines and functions in Fortran except the last 8 routines (# .. #) has the counterpart in C. Unless stated explicitly the first argument IRTN of each subroutine for Fortran has a nonzero value if succeeded, and 0 otherwise, and is the same as the return value of the corresponding function in C. Output variables in the argument list of the Fortran counterpart are listed at "Output".

In C any pointer argument for output, except those for GWsize, can be NULL if the output parameter is not used.

The routines GWTxxxxx's are for the tortoise graphics (a.k.a. the turtle graphics). Also available, though not described here, are the GWDTxxxxx's, which are the double precision counterparts of the GWTxxxxx's. To use GWDTxxxxx's you must read REAL as REAL*8 or DOUBLE PRECISION for [F], and float as double for [C] in this manual. Those tortoise graphics routines maintain the world coordinate internally in real ( for GWTxxxxx's ) or in double precision ( for GWDTxxxxx's ) , accumulated errors in coordinates expected, in drawings using relative coordinates for example, to be very small, compared with other GWxxxxx routines, which internally maintain the logical device coordinate.

The last 8 subroutines in the above table, which are written using GrWin intrinsic routines, GWxxxxx's, are for least compatibility to programs using Calcomp routines. There is no [C] counterparts for them as noted above.

There is no problem if some of the routines for the tortoise graphics and/or the Calcomp compatible routines with some of the GrWin intrinsics are used in a program.

The column 'n' stands for the number the object(s) created by the routine. The stored objects are used to redraw the window, etc. By using gwsaveas/GWsaveas or gwload/GWload the objects can be saved to a file or can be loaded from a file.

Index sorted by Function is available at the end of this manual.




GrWin Library Routines


1. Initialize
*******************************************************************************
[F] SUBROUTINE GWINIT(IRTN)
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWinit(void);
-------------------------------------------------------------------------------
Description
    Initializes the GrWin Library, and open the main frame window by executing
    grwnd.exe with no option if it has not yet been opened.  This routine is
    equivalent to GWinitx(-1,-1,-1,-1,-1,-1,-1,-1,-1).
    Usually there is no need to call this routine because GWopen (or GWopenx)
    calls this automatically if necessary.
*******************************************************************************
[F] SUBROUTINE GWINITX(IRTN, IRB, IX, IY, IW, IH, MA, MM, MZ, ND)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IRB, IX, IY, IW, IH, MA, MM, MZ, ND

[C] int GWinitx(int IRB, int IX, int IY, int IW, int IH, int MA, int MM,
		int MZ, int ND);
-------------------------------------------------------------------------------
Description
    Initializes the GrWin Library, and open the main frame window by executing
    grwnd.exe with options corresponding to the arguments given.  If a negative
    value is specified for an argument, no corresponding option is generated.
    Usually there is no need to call this routine because GWopen (or GWopenx)
    calls GWinitx(-1,-1,-1,-1,-1,-1,-1,-1,-1) automatically if necessary,
    unless you want to specify options.

Input
    IRB = O*32 + L*16 + I*8 + R*4 + B*2 + T*1
            + 65536*(o*32 + l*16 + i*8 + r*4 + b*2 + t*1)
          O = 1[0] the staying open on QUIT mode is set ON [OFF].
          L = 1[0] the landscape printer mode is set ON [OFF].
          I = 1[0] the inquring mode is set ON [OFF].
          R = 1[0] the status bar is displayed [not displayed].
          B = 1[0] the buffering mode is set ON [OFF].
          T = 1[0] the storing mode is set ON [OFF].
      [ l, i,... are the mask bits for the above setting switches L, I,...,
       respectively.  A setting switch with the corresponding mask bit set 1
       is ignored. ]
 IX, IY = Screen coordinates (in pixels) of the top-left corner of the frame
 IW, IH = Width and height (in pixels) of the frame
     MA = Mode number (MA = 1..4) for Arrange Window. [GWarrange(MA)]
     MM = Mode number (MM = 0..14) for Frame's Show State. [GWshowfr(MM)]
     MZ = Mode number (MZ = 1..4) for the Z-Order of the frame. [GWshowfr(MZ+10)]
     ND = The default dpi value for printing, etc.

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

2. Open Window
*******************************************************************************
[F] SUBROUTINE GWOPEN(IRTN, NW)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NW

[C] int GWopen(int NW);
-------------------------------------------------------------------------------
Description
   This routine is equivalent to GWopenx (see the next) with IW = 0, IH = 0,
   IFC = -1, IBC = -1, M = -1 and FN = ''(NULL).
*******************************************************************************
[F] SUBROUTINE GWOPENX(IRTN, NW, IW, IH, IFC, IBC, M, FN)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NW, IW, IH, IFC, IBC, M
    CHARACTER,INTENT(IN) ::  FN*(*)

[C] int GWopenx(int NW, int IW, int IH, int IFC, int IBC, int M, char *FN, int l);
-------------------------------------------------------------------------------
Description
   When NW > 0 a new window with the specified window number NW opens, and an
   unused window number is used for the new window when NW = 0.  When the join
   mode (see GWJOIN) has been set up successflly parameters NW and FN are
   ignored.  In any case GWinitx(-1,-1,-1,-1,-1,-1,-1,-1) is called to open a
   main frame window if necessary.  If the opening or the joining to an window
   is succeeded the number of actually opened window, or 0 otherwise, is
   returned to IRTN.  The argument FN is used to the default file name in
   saving data.   The internal paper size in unit of 0.1 mm is given by the
   width IW and the height IH assuming landscape (IW > IH).   Internally these
   values are used with the resolution assumed in printing, etc. (see GWinitx)
   to determin sizes of bitmaps for buffers, for example.   If the value is
   equal to 0 for IW or IH, or '' for FN, default values are used.    IFC and
   IBC are initial logical color values (LCV: See GWCOLOR) for the foreground
   color and the background color, respectively.  Only one of the reserved
   color values 0..20 or a palette-relative RGB values (See GWCOLOR) can be
   specified for the initial background color IBC.   M is an initial window's
   show state (0..10: see GWshowwn) for the window.   For IFC, IBC or M, if an
   invalid value is specified, a default value is used.

Input
   NW > window number
      = 0: open a new window
   IW > paper width (in 0.1 mm)
      = 0: width of the current printer in pixels is used
   IH > paper height (in 0.1 mm)
      = 0: height of the current printer in pixels is used
  IFC = initial LCV of the foreground color (>= 0);   0 (black) on default
  IBC = initial LCV of the background color (>= 0);  19 (white) on default
    M = window's show state (0..10)
   FN = default file name in saving graphics data
    l = byte length of FN if FN is a string buffer, 0 otherwise ([C])

Output
 IRTN = window number ( > 0 ), 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

3. Quit
*******************************************************************************
[F] SUBROUTINE GWQUIT(IRTN)
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWquit(void);
-------------------------------------------------------------------------------
Description
   Pops up an ending dialog, and wait for a button clicked.  Then close all
   window which is/are opened by the application, and close the main frame
   window if there is no other application which has opened windows in it.
   This routine is equivalent to GWquitx(1).
*******************************************************************************
[F] SUBROUTINE GWQUITX(IRTN, MQ)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: MQ

[C] int GWquitx(int MQ);
-------------------------------------------------------------------------------
Description
   Closes the window(s) opened by the application and the main frame window.
   When the input parameter MQ is not equal to 0 an ending dialog appears.

Input
   MQ  = 0 :   quit now
      != 0 :   popup an ending dialog, and then quit.

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

4. Leave
*******************************************************************************
[F] SUBROUTINE GWLEAVE(IRTN)
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWleave(void);
-------------------------------------------------------------------------------
Description
  Leaves from the graphics window without closing the window.

Input
  None

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

5. Join in a Window
*******************************************************************************
[F] SUBROUTINE GWJOIN(IRTN, NW, IN, IS, JND)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NW, IN, IS
    CHARACTER :: JND*(*)

[C] int GWjoin(int NW, int IN, int IS, char *JND, int l);
-------------------------------------------------------------------------------
Description
   Joins in an existent window, that is, begins drawing in the existent window
   specified.   A main frame (grwnd.exe) window as the target is specified by
   the input parameter IN, and a child window within the main frame window by
   NW.  This routine must be called before any calls to GWopen[x] and GWinit[x]
   and tries to change manners of working of them suited to the join mode.  For
   each of the parameters NW and IN,  an corresponding existent window found
   first is used when the specified value is set equal to 0.  When failed or a
   negative value is spesified to an input paramter a corresponding new window
   opens.  If succeeded the actually joined window number, or 0 if failed, is
   returned to IRTN.  Information of the joining window can be retrieved by
   the variable JND.  If the specified value for IS is 0, no joining is made
   at all, but the output variables are set as if it was actually made.
   Getting information with setting IS = 0 you can make joining by calling
   again this routine with IS != 0.

   CAUTION: Result when more than one applications are joined togather in a
   frame window is unknown.

Input
   NW = a window number
   IN = a main frame window (grwnd.exe) number
    l = byte length of the string buffer JND ([C])

Output
  JND = a string composed of the main frame window number and the window number
        followed by the application name with commas as separators if succeeds.
        An empty string otherwise.
 IRTN = the joined window number ( > 0 ), 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

6. Reset Parameters
*******************************************************************************
[F] SUBROUTINE GWRESET(IRTN)
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWreset(void);
-------------------------------------------------------------------------------
Description
   Resets the internal parameters for the current window.

Input
   None

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

7. Close Window
*******************************************************************************
[F] SUBROUTINE GWCLOSE(IRTN, NW)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NW

[C] int GWclose(int NW);
-------------------------------------------------------------------------------
Description
   Closes the window(s) depending on the value of NW.

Input
   NW > 0: window number
      = 0: the current window
      < 0: the all windows which are opened by the application

Output
 IRTN = the current window number, or 0 if there is no window opened by the
        application
_______________________________________________________________________________
[TOC] [INDEX]

8. Set World Coordinate System
*******************************************************************************
[F] SUBROUTINE GWINDOW(IRTN, X1,Y1,X2,Y2)
    INTEGER,INTENT(OUT) :: IRTN
    REAL,INTENT(IN) :: X1,Y1,X2,Y2

[C] int GWindow(float X1, float Y1, float X2, float Y2);
-------------------------------------------------------------------------------
Description
   Sets the world coordinate system (WCS) by specifying the bottom-left corner
   (X1, Y1) and the top-right corner (X2, Y2) of the view port in WCS to be set.
   On default WCS is defined as identical as the logical coordinate system
   where the size is equal to the paper size and the origin is at the bottom-
   left corner of the view port.  If X1 = X2 with Y1 != Y2 is specified, the
   width in WCS of the view port is chosen so as to make isotropic window
   with the aspect ratio 1:1 using the height |Y2 - Y1| in WCS.  In this case
   the world coordinate of the bottom-center becomes (X1, Y1).  Similarly if
   X1 != X2 with Y1 = Y2 is specified, an isotropic world coordinate system is
   made using the width of the view port |X2 - X1| in WCS.  When X1 = X2 and
   Y1 = Y2, WCS is chosen identical to the logical device coordinate system as
   default.

Input
   X1 = the world x-coordinate of the bottom-left corner of the view port
   Y1 = the world y-coordinate of the bottom-left corner of the view port
   X2 = the world x-coordinate of the top-right corner of the view port
   Y2 = the world y-coordinate of the top-right corner of the view port

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

9. Get World Coordinate System
*******************************************************************************
[F] SUBROUTINE GWGETWN(IRTN, X1,Y1,X2,Y2)
    INTEGER,INTENT(OUT) :: IRTN
    REAL,INTENT(IN) :: X1,Y1,X2,Y2

[C] int GWgetwn(float *X1, float *Y1, float *X2, float *Y2);
-------------------------------------------------------------------------------
Description
   Gets the current world coordinates (see GWINDOW).

Input
  None

Output
   X1 = the world x-coordinate of the bottom-left corner of the view port
   Y1 = the world y-coordinate of the bottom-left corner of the view port
   X2 = the world x-coordinate of the top-right corner of the view port
   Y2 = the world y-coordinate of the top-right corner of the view port
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

10. Set View Port
*******************************************************************************
[F] SUBROUTINE GWVPORT(IRTN, U1,V1,U2,V2)
    INTEGER,INTENT(OUT) :: IRTN
    REAL,INTENT(IN) ::  U1,V1,U2,V2

[C] int GWvport(float U1, float V1, float U2, float V2);
-------------------------------------------------------------------------------
Description
   Sets the view port by specifying the bottom-left (BL) corner and the top-
   right (TR) corner of the view port in the normalized logical coordinate
   system (NLCS).  The normalized logical coordinate system is the coordinate
   system where the shorter of the width and the height of the paper in
   pixels is normalized to unity.  That is, the coordinates of the BL and the
   TR corners of the paper are (0.0, 0.0) and (max(W/H, 1.0), max(H/W, 1.0)),
   respectively, in the normalized logical coordinate system.  If the specified
   view port has null area, that is U1 = U2 or V1 = V2, the whole paper is
   used as the view port.

Input
  U1 = the x-coordinate of the BL corner of the view port (NLCS)
  V1 = the y-coordinate of the BL corner of the view port (NLCS)
  U2 = the x-coordinate of the TR corner of the view port (NLCS)
  V2 = the y-coordinate of the TR corner of the view port (NLCS)

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

11. Set View Port (in the world coordinate)
*******************************************************************************
[F] SUBROUTINE GWPORT(IRTN, X1,Y1,X2,Y2)
    INTEGER,INTENT(OUT) :: IRTN
    REAL,INTENT(IN) :: X1,Y1,X2,Y2

[C] int GWport(float X1, float Y1, float X2, float Y2);
-------------------------------------------------------------------------------
Description
   Sets the view port by specifying the bottom-left (BL) corner and the top-
   right (TR) corner of the view port in the world coordinate system (WCS).
   If the specified view port has null area, that is X1 = X2 or Y1 = Y2, the
   whole paper is used as the view port.  To preserve the world coordinate
   system GWINDOW(IRTN, X1,Y1,X2,Y2) must follow.

Input
  X1 = the world x-coordinate of the BL corner of the view port
  Y1 = the world y-coordinate of the BL corner of the view port
  X2 = the world x-coordinate of the TR corner of the view port
  Y2 = the world y-coordinate of the TR corner of the view port

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

12. Get View Port
*******************************************************************************
[F] SUBROUTINE GWGETVP(IRTN, U1,V1,U2,V2)
    INTEGER,INTENT(OUT) :: IRTN
    REAL,INTENT(OUT) ::  U1,V1,U2,V2

[C] int GWgetvp(float *U1, float *V1, float *U2, float *V2);
-------------------------------------------------------------------------------
Description
   Gets the current view port (see GWVPORT).

Input
  None

Output
   U1 = the x-coordinate of the BL corner of the view port (NLCS)
   V1 = the y-coordinate of the BL corner of the view port (NLCS)
   U2 = the x-coordinate of the TR corner of the view port (NLCS)
   V2 = the y-coordinate of the TR corner of the view port (NLCS)
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

13. Save View Port Info
*******************************************************************************
[F] SUBROUTINE GWSAVEVP(IRTN, IVP)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IVP

[C] int GWsavevp(int IVP);
-------------------------------------------------------------------------------
Description
   Sets the view port number to the current view port.  The view port number
   set is used to recall the view port by calling GWselvp.

Input
 IVP = the view port number ( > 0 )

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

14. Select View Port
*******************************************************************************
[F] SUBROUTINE GWSELVP(IRTN, IVP)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IVP

[C] int GWselvp(int IVP);
-------------------------------------------------------------------------------
Description
   Selects the view port of the view port number IVP set by GWsavevp.  Nothing
   is done if the view port number specified is not defined.  If succeeded the
   view port is restored with the world coordinate system.  The default
   view port is stored with VPN = 0.

Input
 IVP = the view port number

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

15. Get Window / First
*******************************************************************************
[F] SUBROUTINE GWFIRST(IRTN)
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWfirst(void);
-------------------------------------------------------------------------------
Description
   Gets the window number of the first window opened by the application.

Input
   None

Output
 IRTN = the first window number (> 0), or 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

16. Get Window / Next
*******************************************************************************
[F] SUBROUTINE GWNEXT(IRTN, NW)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NW

[C] int GWnext(int NW);
-------------------------------------------------------------------------------
Description
   Gets the window number of the next window to the specified window.   To get
   all window numbers belonging to the application, call GWfirst first, and
   then call GWnext's until 0 is returned.

Input
   NW = a window number

Output
 IRTN = the next window number (> 0), or 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

17. Select Window
*******************************************************************************
[F] SUBROUTINE GWSELECT(IRTN, NW)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NW

[C] int GWselect(int NW);
-------------------------------------------------------------------------------
Description
   Sets the specified window the current window.

Input
   NW = window number (1,2,3,...)

Output
 IRTN = the current window number
_______________________________________________________________________________
[TOC] [INDEX]

18. Set Window's Show State
*******************************************************************************
[F] SUBROUTINE GWSHOWWN(IRTN, NW, IS)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NW, IS

[C] int GWshowwn(int NW, int IS);
-------------------------------------------------------------------------------
Description
   Sets the specified window's show state.    The current window is not changed.
   When NW = 0, the current window is specified.

Input
   NW = window number (0,1,2,3,...)
   IS = 0: Hides the window and activates another window.
        1: Maximizes the specified window.
        2: Minimizes the specified window and activates the next top-level
           window in the Z order.
        3: Activates and displays the window. If the window is minimized or
           maximized, the system restores it to its original size and position.
           An application should specify this flag when restoring a minimized
           window.
        4: Activates the window and displays it in its current size and
           position.
        5: Activates the window and displays it as a maximized window.
        6: Activates the window and displays it as a minimized window.
        7: Displays the window as a minimized window. The active window remains
           active.
        8: Displays the window in its current state. The active window remains
           active.
        9: Displays a window in its most recent size and position. The active
           window remains active.
       10: Activates and displays a window. If the window is minimized or
           maximized, the system restores it to its original size and position.
           An application should specify this flag when displaying the window
           for the first time.

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

19. Set Frame's Show State
*******************************************************************************
[F] SUBROUTINE GWSHOWFR(IRTN, IS)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IS

[C] int GWshowfr(int IS);
-------------------------------------------------------------------------------
Description
   Sets the frame's show state.
Input
   IS = 0: Hides the frame and activates another frame.
        1: Maximizes the specified frame.
        2: Minimizes the specified frame and activates the next top-level
           frame in the Z order.
        3: Activates and displays the frame. If the frame is minimized or
           maximized, the system restores it to its original size and position.
           An application should specify this flag when restoring a minimized
           frame.
        4: Activates the frame and displays it in its current size and
           position.
        5: Activates the frame and displays it as a maximized frame.
        6: Activates the frame and displays it as a minimized frame.
        7: Displays the frame as a minimized frame. The active frame remains
           active.
        8: Displays the frame in its current state. The active frame remains
           active.
        9: Displays a frame in its most recent size and position. The active
           frame remains active.
       10: Activates and displays a frame. If the frame is minimized or
           maximized, the system restores it to its original size and position.
           An application should specify this flag when displaying the frame
           for the first time.
       11: Place the frame window at topmost
       12: Place the frame window behind all topmost windows
       13: Place the frame window at the top
       14: Place the frame window at the bottom

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

20. Arrange Windows
*******************************************************************************
[F] SUBROUTINE GWARRANGE(IRTN, M)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: M

[C] int GWarrange(int M);
-------------------------------------------------------------------------------
Description
   Arranges the windows in the main window.   Same as [Window] -> [...] at the
   Menu Bar for M < 5.

Input
    M = 1: Cascade
        2: Tile Horizontally
        3: Tile Vertically
        4: Arrange Icons
        5: Activate the current window
        6: Maximize the current window
        7: Restore the current window
        8: Destroy the current window

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

21. Get Position in LDCS
*******************************************************************************
[F] SUBROUTINE GWLDCPOS(IRTN, X, Y, IU, IV)
    REAL,INTENT(IN) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN, IU, IV

[C] int GWldcpos(float X, float Y, int *IU, int *IV);
-------------------------------------------------------------------------------
Description
   Transforms world coordinates (X,Y) into logical device coordinate [IU,IV].
   The logical device coordinate system (LDC) is defined by specifying
   the top-left corner of "the paper" as the origin [0,0], the u-axis to the
   right and the v-axis to the bottom, in the unit of pixel for the current
   printer.

Input
    X = the world x-coordinate
    Y = the world y-coordinate

Output
   IU = the logical device u-coordinate
   IV = the logical device v-coordinate
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

22. Get Sise in LDCS
*******************************************************************************
[F] SUBROUTINE GWLDCSIZ(IRTN, W, H, IU, IV)
    REAL,INTENT(IN) :: W, H
    INTEGER,INTENT(OUT) :: IRTN, IU, IV

[C] int GWldcsiz(float W, float H, int *IU, int *IV);
-------------------------------------------------------------------------------
Description
   The width W and the height H in the WCS are transformed into those in LDCS.

Input
    W = width in the WCS
    H = height in the WCS

Output
   IU = width in the LDCS
   IV = height in the LDCS
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

23. Retrieve Pixel Sise in WCS
*******************************************************************************
[F] SUBROUTINE GWPXLSIZ(IRTN, W, H)
    REAL,INTENT(OUT) :: W, H
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWpxlsiz(float *W, float *H);
-------------------------------------------------------------------------------
Description
   Retrieves the current values for the width W and the height H in the WCS of
   a pixel on the working display.   These values depend on the current size of
   the graphics window and the current display mode.

Input
    None

Output
    W = width of a pixel in the WCS
    H = height of a pixel in the WCS
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

24. Set Pen Attributes
*******************************************************************************
[F] SUBROUTINE GWSETPEN(IRTN, IPC, IPS, IPW, MX)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IPC, IPS, IPW, MX

[C] int GWsetpen(int IPC, int IPS, int IPW, int MX);
-------------------------------------------------------------------------------
Description
   Set color, style, width and mix mode of the current pen.   When the pen
   style is specified other than as the solid line (IPS=1), the width is set
   to 1.   The mix mode defines how to mix the colors of the current pen or
   the current brush and the back grownd, or lines, etc., already drawn on the
   window.   When MX > 15, the value (MX-16) is used as the "binary raster
   operation code [W]".   In principle, a negative input parameter does not
   change the corresponding attribute of the current pen.   It should be noted
   that negative numbers other than -1 specified for IBC have special meanings.
   When the all parameters are specified to be equal to -1 the current pen
   position is initialized (see GWLINE2).

Input
  IPC != -1: Logical color value (see GWCOLOR).
       = -1: unchanged

  IPS = pen style
        0: GWL_NULL
        1: GWL_SOLID
        2: GWL_DASH
        3: GWL_DOT
        4: GWL_DASHDOT
        5: GWL_DASHDOTDOT

  IPW = pen width in the logical device coordinate system.   When 0, the width
        is set as 1 pixcel, regardless of the current output device.

   MX = mix mode
        0:	GWX_NOP
        1:	GWX_BLACK
        2:	GWX_WHITE
        3:	GWX_NOT
        4:	GWX_COPYPEN
        5:	GWX_MASKPEN
        6:	GWX_MERGEPEN
        7:	GWX_XORPEN
        8:	GWX_NOTCOPYPEN
        9:	GWX_NOTMASKPEN
       10:	GWX_NOTMERGEPEN
       11:	GWX_NOTXORPEN
       12:	GWX_MASKNOTPEN
       13:	GWX_MASKPENNOT
       14:	GWX_MERGENOTPEN
       15:	GWX_MERGEPENNOT

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

25. Get Pen Attributes
*******************************************************************************
[F] SUBROUTINE GWGETPEN(IRTN, IPC, IPS, IPW, MX)
    INTEGER,INTENT(OUT) :: IRTN, IPC, IPS, IPW, MX

[C] int GWgetpen(int *IPC, int *IPS, int *IPW, int *MX);
-------------------------------------------------------------------------------
Description
   Get the logical color value, style, width and mix mode of the current pen.

Input
   None

Output
  IPC = the logical color value
  IPS = style
  IPW = width
   MX = mix mode
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

26. Set Brush Attributes
*******************************************************************************
[F] SUBROUTINE GWSETBRS(IRTN, IBC, IBS, IBH)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IBC, IBS, IBH

[C] int GWsetbrs(int IBC, int IBS, int IBH);
-------------------------------------------------------------------------------
Description
   Set color, style and hatch pattern of the current brush.   If a negative
   number is specified as an input parameter the corresponding attribute
   is not changed.    It should be noted that for IBC, negative numbers other
   than -1 have special meanings.

Input
  IBC >= 0: Logical color value.
      = -1: unchanged
      < -1: Refer to GWCOLOR in this manual

  IBS = 0: GWB_NULL
        1: GWB_SOLID
        2: GWB_HATCHED
        3: GWB_BSPATTERN    (not implemented)
        4: GWB_DIBPATTERN   (not implemented)
        5: GWB_DIBPATTERNPT (not implemented)

  IBH = 0: GWB_NULL
        1: GWB_HORIZONTAL
        2: GWB_VERTICAL
        3: GWB_FDIAGONAL
        4: GWB_BDIAGONAL
        5: GWB_CROSS
        6: GWB_DIAGCROSS

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

27. Get Brush Attributes
*******************************************************************************
[F] SUBROUTINE GWGETBRS(IRTN, IBC, IBS, IBH)
    INTEGER,INTENT(OUT) :: IRTN, IBC, IBS, IBH

[C] int GWgetbrs(int *IBC, int *IBS, int *IBH);
-------------------------------------------------------------------------------
Description
   Get color, style and hatch pattern of the current brush.    Refer to GWSETBRS
   to know meanings of parameters .

Input
   None

Output
  IBC = logical color value
  IBS = Style
  IPW = Hatch pattern
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

28. Set Text Font Attributes
*******************************************************************************
[F] SUBROUTINE GWSETTXT(IRTN, H, A, IO, K, KB, FACE)
    REAL,INTENT(IN) ::  H, A
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IO, K, KB
    CHARACTER,INTENT(IN) ::  FACE*(*)

[C] int GWsettxt(float H, float A, int IO, int K, int KB, char *FACE, int l);
-------------------------------------------------------------------------------
Description
   Set attributes for the current text font.   Only a face name of an installed
   TrueType font can be specified to the input parameter FACE.  When a space is
   specified to the string variable FACE the face name of the current text font
   is not changed.   If failed to create a font using the specified parameters,
   or FACE is set as '*', a font dialog is used to create the current text font.

Input
    H > 0: height in world coordinate system
      = 0: use default value
      < 0: not changed
    A = angle (in deg/360, counterclockwise; |A| < 1.0)
        not changed if |A| >= 1.0
   IO = set the reference point at
      = 0: GWO_CENTER      (center)
      = 1: GWO_BOTTOMLEFT  (bottom-left; default)
      = 2: GWO_BOTTOMRIGHT (bottom-right)
      = 3: GWO_TOPRIGHT    (top-right)
      = 4: GWO_TOPLEFT     (top-left)
      = 5: GWO_LEFT        (left)
      = 6: GWO_BOTTOM      (bottom)
      = 7: GWO_RIGHT       (right)
      = 8: GWO_TOP         (top)
    K = logical color value (see GWCOLOR) for text color
      = -1: not changed
   KB = logical color value (see GWCOLOR) for text-background color
      = -1: not changed
      = -100: transparent(default)
 FACE = TrueType face name
    l = byte length of FACE if FACE is a string buffer, 0 otherwise ([C])

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

29. Get Text Extent
*******************************************************************************
[F] SUBROUTINE GWGETTXT(IRTN, W, H, X, Y, TXT)
    REAL,INTENT(OUT) :: W, H, X, Y
    INTEGER,INTENT(OUT) :: IRTN
    CHARACTER,INTENT(IN) :: TXT*(*)

[C] int GWgettxt(float *W, float *H, float *X, float *Y, char *TXT, int l);
-------------------------------------------------------------------------------
Description
    Retrieve extent of a text string in the world coordinate.

Input
   TXT = string
     l = byte length of TXT if specified as a string buffer, 0 otherwise ([C])

Output
  IRTN = return code
     W = width of the string in the world coordinate
     H = height of the string in the world coordinate
     X = the world x-coordinate of the offset of the reference point
     Y = the world y-coordinate of the offset of the reference point
_______________________________________________________________________________
[TOC] [INDEX]

30. Draw Text String
*******************************************************************************
[F] SUBROUTINE GWPUTTXT(IRTN, X, Y, TXT)
    REAL,INTENT(IN) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN
    CHARACTER,INTENT(IN) :: TXT*(*)

[C] int GWputtxt(float X, float Y, char *TXT, int l);
-------------------------------------------------------------------------------
Description
    Draw a text string on the current window using the current text font.
    Attributes of the current text font can be changed by GWSETTXT or manually
    from [Options] -> [Font] at the menu bar.   The width of the string cannot
    be set because it depends on the contents and the font using.   If a point
    far outside the paper (see GWINDOW) as the bottom-left corner of the string
    to be drawn is specified, by using GWFMAX() for example, the output string
    follows the previous one.

Input
     X = the world x-coordinate of the reference point of the string
     Y = the world y-coordinate of the reference point of the string
   TXT = string to be drawn
     l = byte length of TXT if specified as a string buffer, 0 otherwise ([C])

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

31. Set Symbol Font Attributes
*******************************************************************************
[F] SUBROUTINE GWSETSYM(IRTN, H, A, IO, K, KB, FACE)
    REAL,INTENT(IN) :: H, A
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IO, K, KB
    CHARACTER,INTENT(IN) :: FACE*(*)

[C] int GWsetsym(float H, float A, int IO, int K, int KB, char *FACE, int l);
-------------------------------------------------------------------------------
Description
   Set attributes for the current symbol font.  Only a face name of an installed
   TrueType font can be specified to the input parameter FACE.  When a space is
   specified to the string variable FACE the face name of the current symbol font
   is not changed.   If failed to create a font using the specified parameters, a
   font dialog is used to create the current symbol font.

Input
    H > 0: height in the world coordinate system
      = 0: use the default value
      < 0: not changed
    A = angle (in deg/360, counterclockwise; |A| < 1.0)
        not changed if |A| >= 1.0
   IO = set the reference point at
      = 0: GWO_CENTER (default)
      = 1: GWO_BOTTOMLEFT
      = 2: GWO_BOTTOMRIGHT
      = 3: GWO_TOPRIGHT
      = 4: GWO_TOPLEFT
      = 5: GWO_LEFT
      = 6: GWO_BOTTOM
      = 7: GWO_RIGHT
      = 8: GWO_TOP
    K = logical color value (see GWCOLOR) for text color
      = -1: not changed
   KB = logical color value (see GWCOLOR) for text-background color
      = -1: not changed
      = -100: transparent(default)
 FACE = TrueType face name
    l = byte length of FACE if FACE is a string buffer, 0 otherwise ([C])

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

32. Get Symbol Extent
*******************************************************************************
[F] SUBROUTINE GWGETSYM(IRTN, W, H, IC)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IC
    REAL,INTENT(OUT) ::  W, H

[C] int GWgetsym(float *W, float *H, int IC);
-------------------------------------------------------------------------------
Description
    Retrieve extent of a symbol in the world coordinate.

Input
    IC = symbol code (0..255)

Output
  IRTN = return code
     W = width of the symbol in the world coordinate
     H = height of the symbol in the world coordinate
_______________________________________________________________________________
[TOC] [INDEX]

33. Draw Symbol
*******************************************************************************
[F] SUBROUTINE GWPUTSYM(IRTN, X, Y, IC)
    REAL,INTENT(IN) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IC

[C] int GWputsym(float X, float Y, int IC);
-------------------------------------------------------------------------------
Description
    Draw a symbol character on the current window using the current symbol font.
    Attributes of the current symbol font can be changed by GWSETSYM or manually
    from [Options] -> [Symbol] at the menu bar.   On default the face name is
    assumed to be "WingDings".   The attributes of the current symbol font are
    not changed.

Input
    X = the world x-coordinate of the center of the symbol
    Y = the world y-coordinate of the center of the symbol
   IC = symbol code (0..255)

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

34. Status Bar
*******************************************************************************
[F] SUBROUTINE GWSETMSG(IRTN, TXT)
    INTEGER,INTENT(OUT) :: IRTN
    CHARACTER,INTENT(IN) :: TXT*(*)

[C] int GWsetmsg(char *TXT, int l);
-------------------------------------------------------------------------------
Description
    Display a text string at the status bar.

Input
   TXT = string to be displayed
     l = byte length of TXT if TXT is a string buffer, 0 otherwise ([C])

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

35. Message Box
*******************************************************************************
[F] FUNCTION MSGBOX(TXT)
    INTEGER :: MSGBOX
    CHARACTER,INTENT(IN) :: TXT*(*)

[C] int GWmsgbox(char *TXT, int l);
-------------------------------------------------------------------------------
Description
    Popup a message box, and get the ending status of the selected button.

Input
   TXT = string to be displayed in the message box
     l = byte length of TXT if TXT is a string buffer, 0 otherwise ([C])

Output
   None

Return value
    1: YES button was selected
   -1: NO button was selected
    0: otherwise
_______________________________________________________________________________
[TOC] [INDEX]

36. Pen Position
*******************************************************************************
[F] SUBROUTINE GWGETPOS(IRTN, X, Y)
    REAL,INTENT(OUT) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWgetpos(float *X, float *Y);
-------------------------------------------------------------------------------
Description
   Retrieves the current pen position in the world coordinate.

Input
   None

Output
    X = the world x-coordinate of the current pen position.
    Y = the world y-coordinate of the current pen position.
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

37. Move Pen
*******************************************************************************
[F] SUBROUTINE GWMOVE2(IRTN, X, Y)
    INTEGER,INTENT(OUT) :: IRTN
    REAL,INTENT(IN) :: X, Y

[C] int GWmove2(float X, float Y);
-------------------------------------------------------------------------------
Description
   Moves current pen position to the point (X, Y) in the world coordinate.
   Nothing is drawn.

Input
    X = x coordinate of the destination point.
    Y = y coordinate of the destination point.

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

38. Draw Line To
*******************************************************************************
[F] SUBROUTINE GWLINE2(IRTN, X, Y)
    REAL,INTENT(IN) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWline2(float X, float Y);
-------------------------------------------------------------------------------
Description
   Draws a line connecting the current pen position and the point (X, Y)
   specified, and then update the current pen position.   The current pen is
   used to draw the line.  If the pen position is undefined, as in the initial
   state, no line is drawn.  The pen position can be initialized by GWSETPEN.

Input
    X = the world x-coordinate of the destination point.
    Y = the world y-coordinate of the destination point.

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

38. Draw Line
*******************************************************************************
[F] SUBROUTINE GWLINE(IRTN, X1, Y1, X2, Y2)
    REAL,INTENT(IN) :: X1, Y1, X2, Y2
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWline(float X1, float Y1, float X2, float Y2);
-------------------------------------------------------------------------------
Description
   Draws a line connecting the two points (X1, Y1) and (X2, Y2) using the
   current pen.

Output
   X1 = x coordinate of the beginning point.
   Y1 = y coordinate of the beginning point.
   X2 = x coordinate of the end point.
   Y2 = y coordinate of the end point.

Output
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

39. Draw Rectangle
*******************************************************************************
[F] SUBROUTINE GWRECT(IRTN, X1, Y1, X2, Y2)
    REAL,INTENT(IN) :: X1, Y1, X2, Y2
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWrect(float X1, float Y1, float X2, float Y2);
-------------------------------------------------------------------------------
Description
   Draws a rectangle specified by a pair of two diagonal points (X1, Y1) and
   (X2, Y2).   The current pen is used to draw the rectangle, and the current
   brush is used to fill the rectangle.

Input
   X1 = the world x-coordinate of the point 1.
   Y1 = the world y-coordinate of the point 1.
   X2 = the world x-coordinate of the point 2.
   Y2 = the world y-coordinate of the point 2.

Output
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

40. Draw Rectangle Filled with Solid Color
*******************************************************************************
[F] SUBROUTINE GWSRECT(IRTN, X1, Y1, X2, Y2, K)
    REAL,INTENT(IN) :: X1, Y1, X2, Y2
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: K

[C] int GWsrect(float X1, float Y1, float X2, float Y2, int K);
-------------------------------------------------------------------------------
Description
   Fills the given rectangle with the specified solid color in a logical color
   value (LCV).  The rectangle is specified by a pair of two diagonal points
   (X1, Y1) and (X2, Y2).

Input
   X1 = the world x-coordinate of the point 1.
   Y1 = the world y-coordinate of the point 1.
   X2 = the world x-coordinate of the point 2.
   Y2 = the world y-coordinate of the point 2.
    K = color in LCV

Output
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

41. Draw Round Rectangle
*******************************************************************************
[F] SUBROUTINE GWRRECT(IRTN, X1, Y1, X2, Y2, W, H)
    REAL,INTENT(IN) :: X1, Y1, X2, Y2, W, H
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWrrect(float X1, float Y1, float X2, float Y2, float W, float H);
-------------------------------------------------------------------------------
Description
   Draws a rectangle with rounded corners using the current pen.  The two
   points (X1, Y1) and (X2, Y2) specify a pair of diagonal points of the
   bounding rectangle, and (W, H) the width and the height of the ellipse
   used to draw the rounded corners.  The interior of the rectangle is filled
   using the current brush.

Input
   X1 = the world x-coordinate of the point 1.
   Y1 = the world y-coordinate of the point 1.
   X2 = the world x-coordinate of the point 2.
   Y2 = the world y-coordinate of the point 2.
    W = the width of the ellipse used to draw the rounded corners.
    H = the height of the ellipse used to draw the rounded corners.

Output
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

42. Draw Ellipse
*******************************************************************************
[F] SUBROUTINE GWELLIPSE(IRTN, X1, Y1, X2, Y2)
    REAL,INTENT(IN) :: X1, Y1, X2, Y2
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWellipse(float X1, float Y1, float X2, float Y2);
-------------------------------------------------------------------------------
Description
   Draws an ellipse. The center of the ellipse is the center of the bounding
   rectangle specified by a pair of two diagonal points (X1, Y1) and (X2, Y2).
   The ellipse is drawn with the current pen, and its interior is filled with
   the current brush.

Input
   X1 = the world x-coordinate of the point 1.
   Y1 = the world y-coordinate of the point 1.
   X2 = the world x-coordinate of the point 2.
   Y2 = the world y-coordinate of the point 2.

Output
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

43. Draw Arc
*******************************************************************************
[F] SUBROUTINE GWARC(IRTN, X1, Y1, X2, Y2, A, AW)
    REAL,INTENT(IN) :: X1, Y1, X2, Y2, A, AW
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWarc(float X1, float Y1, float X2, float Y2, float A, float AW);
-------------------------------------------------------------------------------
Description
   Draws an arc of an ellipse. The center of the ellipse is the center of the
   bounding rectangle specified by a pair of two diagonal points (X1, Y1) and
   (X2, Y2).   The starting point of the arc is specified by the start angle A
   measured counterclockwise from the x-direction in the unit of degrees/360.
   The ending point is similarly located by measuring counterclockwise from
   the starting point with the sweep angle AW.   For A and AW, if a value less
   than or equal to -1.0 is specified, the default value is used.  The arc is
   drawn using the current pen, and it is not filled.

Input
   X1 = the world x-coordinate of the point 1.
   Y1 = the world y-coordinate of the point 1.
   X2 = the world x-coordinate of the point 2.
   Y2 = the world y-coordinate of the point 2.
    A = the start angle relative to the x-axis (in deg/360).
   AW = the sweep angle relative to the starting angle (in deg/360).

Output
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

44. Draw Closed Arc
*******************************************************************************
[F] SUBROUTINE GWCHORD(IRTN, X1, Y1, X2, Y2, A, AW)
    REAL,INTENT(IN) :: X1, Y1, X2, Y2, A, AW
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWchord(float X1, float Y1, float X2, float Y2, float A, float AW);
-------------------------------------------------------------------------------
Description
   Draws an arc of an ellipse with the chord closing the arc.  The center of
   the arc is the center of the bounding rectangle specified by a pair of two
   diagonal points (X1, Y1) and (X2, Y2).  The starting point of the arc is
   specified by the start angle A measured counterclockwise from the x-
   direction in the unit of degrees/360.  The ending point is similarly
   located by measuring counterclockwise from the starting point with the
   sweep angle AW.   For A and AW, if a value less than or equal to -1.0 is
   specified, the default value is used.  The curve is drawn using the current
   pen, and it is filled using the current brush.

Input
   X1 = the world x-coordinate of the point 1.
   Y1 = the world y-coordinate of the point 1.
   X2 = the world x-coordinate of the point 2.
   Y2 = the world y-coordinate of the point 2.
    A = the start angle relative to the x-axis (in deg/360).
   AW = the sweep angle relative to the starting angle (in deg/360).

Output
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

45. Draw Pie
*******************************************************************************
[F] SUBROUTINE GWPIE(IRTN, X1, Y1, X2, Y2, A, AW)
    REAL,INTENT(IN) :: X1, Y1, X2, Y2, A, AW
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWpie(float X1, float Y1, float X2, float Y2, float A, float AW);
-------------------------------------------------------------------------------
Description
   Draws a pie.  The pie consists of an arc of an ellipse and the two closing
   radials from the center of the ellipse.  The bounding rectangle of the
   ellipse is specified by a pair of two diagonal points (X1, Y1) and (X2, Y2).
   The starting point of the arc is specified by the start angle A measured
   counterclockwise from the x-direction in the unit of degrees/360.  The
   ending point is similarly located by measuring counterclockwise from the
   starting point with the sweep angle AW.   For A and AW, if a value less
   than or equal to -1.0 is specified, the default value is used.  The curve
   is drawn using the current pen, and it is filled using the current brush.

Input
   X1 = the world x-coordinate of the point 1.
   Y1 = the world y-coordinate of the point 1.
   X2 = the world x-coordinate of the point 2.
   Y2 = the world y-coordinate of the point 2.
    A = the start angle relative to the x-axis (in deg/360).
   AW = the sweep angle relative to the starting angle (in deg/360).

Output
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

45. Plot 1D Array Elements
*******************************************************************************
[F] SUBROUTINE GWPLOT1(IRTN, M, N, P1, PN, S, O, A, B, ARRY)
    REAL,INTENT(IN) :: P1, PN, S, O, A, B, ARRY(N)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: M, N

[C] int GWplot1(int M, int N, float P1, float PN, float S, float O,
                float A, float B, float *ARRY);
-------------------------------------------------------------------------------
Description
   Transforms lenearly the first |N| elements of the 1D array ARRY, and then
   plots them at regular horizantal or vertical intervals in a format specified
   by M.  The world (x,y) coordinate of the i-th point (i = 1..|N|) is given as
       (P1 + (i - 1)*(PN - P1)/(N - 1), A*ARRY(i)+B)      when N > 0
   or
       (A*ARRY(i)+B, P1 + (i - 1)*(PN - P1)/( - N - 1))   when N < 0
   in FORTRAN.  In C, ARRY(i) should read ARRY[i-1].

Input
     M = format of the plot
       = -1: line segments drawn with the current pen
       = -2(-3): vertical(horizontal) lines drawn with the current pen
       = -4(-5): vertical(horizontal) bars of the width S drawn with the current
                 brush
       = -6(-7): vertical(horizontal) bars of the width S drawn with the current
                 pen as edges and with the current brush for interiors
       =  0: marks of the current mark of the height S
       >  0: a series of EMFs of a registered EMF of the number M
   |N| = the number ( > 1: for line segments ) of points to be plot.  When N > 0
         the values A*ARRY()+B are regarded as world y coordinates, and when
         N < 0 as world x coordinates.
    P1 = the world x (or y) coordinate of the first point when N > 0 (< 0)
    PN = the world x (or y) coordinate of the last point when N > 0 (< 0)
     S = the width (in the world coordinate) of each bar when M < -1, or the
         mark height when M == 0
     O = the base world y or x coordinate of each vertical or horizontal bar
         when M < -1, or the IOF parameter (see GWPUTEMF) when M > 0.
     A = the coefficient in the linear transformation
     B = the additive constant in the linear transformation
  ARRY = 1D array to be plotted

Output
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

46. Draw Polygon
*******************************************************************************
[F] SUBROUTINE GWPOLYGON(IRTN, POINTS, N, MF)
    REAL,INTENT(IN) :: POINTS(2,N)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: N, MF

[C] int GWpolygon(float *POINTS, int N, int MF);
-------------------------------------------------------------------------------
Description
    Draws a polygon consisting of two or more points (vertices) connected by
    lines, using the current pen. The system closes the polygon automatically,
    if necessary, by drawing a line from the last vertex to the first.    The
    current polygon-filling mode can be set by the parameter MF.   When MF < 0
    it is not changed.  In C the memory block that the pointer POINTS points to
    must be contiguous, and *(POINTS + 2*i - 2) and *(POINTS + 2*i - 1) must
    be the x and the y cordinates of the i-th vertex, respectively, for i = 1
    to N.

Input
    POINTS(1,i) = the world x-coordinate of the i-th vertex (i = 1 to N).
    POINTS(2,i) = the world y-coordinate of the i-th vertex (i = 1 to N).
              N = number of vertices
             MF = polygon-filling mode
                  0: Alternate mode (default)
                  1: Winding mode
          otherwise: Left unchanged

Output
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

47. Draw Line Segments
*******************************************************************************
[F] SUBROUTINE GWPOLYLIN(IRTN, POINTS, N)
    REAL,INTENT(IN) :: POINTS(2,N)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: N

[C] int GWpolylin(float *POINTS, int N);
-------------------------------------------------------------------------------
Description
   Draws lines connecting the given points successively, using the current pen.
   The figure is not filled if it is a closed one.   In C the memory block that
   the pointer POINTS points to must be contiguous, and *(POINTS + 2*i - 2) and
   *(POINTS + 2*i - 1) must be the x and the y cordinates of the i-th vertex,
   respectively, for i = 1 to N.

Input
    POINTS(1,i) = the world x-coordinate of the i-th point (i = 1 to N).
    POINTS(2,i) = the world y-coordinate of the i-th point (i = 1 to N).
              N = number of points ( > 1 )

Output
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

48. Draw Bezier
*******************************************************************************
[F] SUBROUTINE GWBEZIER(IRTN, POINTS, N)
    REAL,INTENT(IN) :: POINTS(2,N)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: N

[C] int GWbezier(float *POINTS, int N);
-------------------------------------------------------------------------------
Description
    Draws one or more Bezier splines using the current pen without filling.
    This function draws cubic Bezier splines by using the endpoints and control
    points specified by the array POINT. The first spline is drawn from the
    first point to the fourth point by using the second and third points as
    control points. Each subsequent spline in the sequence needs exactly three
    more points: the end point of the previous spline is used as the starting
    point, the next two points in the sequence are control points, and the
    third is the end point. The number of the points N must be one more than
    three times the number of splines to be drawn.   In C the memory block that
    the pointer POINTS points to must be contiguous, and *(POINTS + 2*i - 2)
    and *(POINTS + 2*i - 1) must be the x and the y cordinates of the i-th
    vertex, respectively, for i = 1 to N.

Input
    POINTS(1,i) = the world x-coordinate of the i-th point (i = 1 to N).
    POINTS(2,i) = the world y-coordinate of the i-th point (i = 1 to N).
              N = the number of points in the POINTS array.

Output
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

49. Fill Bounded Area
*******************************************************************************
[F] SUBROUTINE GWFLOOD(IRTN, X, Y)
    REAL,INTENT(IN) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWflood(float X, float Y);
-------------------------------------------------------------------------------
Description
   Fills an area of the display surface with the current brush. The area is
   assumed to be bounded as specified by the same color as the color of the
   pixel at the beginning point (X, Y) [This routine is rather inefficient,
   and many printer (drivers) do not support this feature].

Input
   X = the world x-coordinate of the point where filling begins.
   Y = the world x-coordinate of the point where filling begins.

Output
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

50. Clear Window
*******************************************************************************
[F] SUBROUTINE GWCLEAR(IRTN, K)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: K

[C] int GWclear(int K);
-------------------------------------------------------------------------------
Description
   Fills the current viewport with the specified collor.

Input
    K != -1: a logical color value (see GWCOLOR)
       = -1: clears the window with erasing the objects on memory

Output
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

51. Set Mark Attributes
*******************************************************************************
[F] SUBROUTINE GWSETMRK(IRTN, MT, S, K, KB, MX)
    REAL,INTENT(IN) :: S
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: MT, K, KB, MX

[C] int GWsetmrk(int MT, float S, int K, int KB, int MX);
-------------------------------------------------------------------------------
Description
   Sets mark number MT, size S in world coordinate, logical mark color K,
   logical background mark color KB,  and the mix mode MX to the current mark.
   When MX > 15, the value (MX-16) is used as the "binary raster operation
   code [W]".  Negative numbers specified for parameters do not change
   corresponding attributes, except for K and KB (see GWCOLOR).   If MT = 0
   is specified, the parameter S is read a size of a dot, precisely a small
   solid rectangle, in pixels and so the size of any instance of such a dot
   is independent of the view mode, or not expanded even in 'Zoom in' mode,
   for example.

Input
   MT = 0: GWM_DOT          (dot)
        1: GWM_SOLIDSQUARE  (solid square)
        2: GWM_PLUS         (+)
        3: GWM_TIMES        (x)
        4: GWM_ASTERISK     (superposition of + and X)
        5: GWM_SQUARE       (filled square)
        6: GWM_CIRCLE       (filled circle)
   others: neglected
    S  = size of a dot in pixels (MT = 0)
       = height in the world coordinate > 0.0  (MT > 0)
    K != -1: logical mark color value (see GWCOLOR)
       = -1: unchanged
   KB != -1: logical mark background color value (see GWCOLOR)
       = -1: unchanged
       = -100: transparent(default)
   MX = mix mode for the mark (see GWSETPEN)

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

52. Draw Mark
*******************************************************************************
[F] SUBROUTINE GWPUTMRK(IRTN, X, Y)
    REAL,INTENT(IN) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWputmrk(float X, float Y);
-------------------------------------------------------------------------------
Description
    Draws the current mark set by GWSETMRK at the point (X, Y).

Input
    X = the world x-coordinate of the center of the mark)
    Y = the world y-coordinate of the center of the mark)

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

53. Get Mark Attributes
*******************************************************************************
[F] SUBROUTINE GWGETMRK(IRTN, MT, S, K, KB, MX)
    INTEGER IRTN, MT, K, KB, MX
    REAL S

[C] int GWgetmrk(int *MT, float *S, int *K, int *KB, int *MX);
-------------------------------------------------------------------------------
Description
   Gets mark number, mark size, mark color, mark background color and mix mode
   for the current mark.

Input
   None

Output
   MT = mark number
    S = mark height in the world coordinate
    K = logical mark color value (see GWCOLOR)
   KB = logical mark background color value (see GWCOLOR)
   MX = mix mode for the mark (see GWSETPEN)
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

54. Set Attributes of Mark Pen
*******************************************************************************
[F] SUBROUTINE GWMRKPEN(IRTN, IPC, IPS, IPW)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IPC, IPS, IPW

[C] int GWmrkpen(int IPC, int IPS, int IPW);
-------------------------------------------------------------------------------
Description
   Set color, style, width and mix mode of the pen for drawing a mark.   See
   the descriptions of GWSETPEN/GWsetpen for details.
_______________________________________________________________________________
[TOC] [INDEX]

55. Set Attributes of Mark Brush
*******************************************************************************
[F] SUBROUTINE GWMRKBRS(IRTN, IBC, IBS, IBH)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IBC, IBS, IBH

[C] int GWmrkbrs(int IBC, int IBS, int IBH);
-------------------------------------------------------------------------------
Description
   Set color, style and hatch pattern of the brush for drawing a mark.   See
   the descriptions of GWSETBRS/GWsetbrs for details.
_______________________________________________________________________________
[TOC] [INDEX]

56. Set Transformation Matrix
*******************************************************************************
[F] SUBROUTINE GWSETXFRM(IRTN, XFRM)
    REAL,INTENT(IN) :: XFRM(6)
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWsetxfrm(float *XFRM);
-------------------------------------------------------------------------------
Description
   Sets the transformation matrix.  The transformation matrix is used for
   transformations such as rotations of bitmaps and marks.   A world coordinate
   point (x, y) is transformed to (x', y') using
      x' = XFRM(1) + XFRM(2) * x + XFRM(3) * y
      y' = XFRM(4) + XFRM(5) * x + XFRM(6) * y
   This does not work properly on Windows 9x/Me.

Input
   XFRM = the elements of the transformation matrix

Output
   IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

57. Get Transformation Matrix
*******************************************************************************
[F] SUBROUTINE GWGETXFRM(IRTN, XFRM)
    REAL,INTENT(OUT) :: XFRM(6)
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWgetxfrm(float *XFRM);
-------------------------------------------------------------------------------
Description
   Retrieves the current transformation matrix.  The transformation matrix is
   used for transformations such as rotations of bitmaps and marks.

Input
   None

Output
   XFRM = the elements of the transformation matrix(See GWSETXFRM).
   IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

58. Set Clipping Region
*******************************************************************************
[F] SUBROUTINE GWSETRGN(IRTN, X1, Y1, X2, Y2, M)
    REAL,INTENT(IN) :: X1, Y1, X2, Y2
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: M

[C] int GWsetrgn(float X1, float Y1, float X2, float Y2, int M);
-------------------------------------------------------------------------------
Description
   Combines the current clipping region and a rectangular region specified by
   a pair of two diagonal points (X1, Y1) and (X2, Y2) using a mode specified
   by M, and sets the combined region as the current clipping region.   If
   M < 0 or M > 4 and X1 = X2 or Y1 = Y2 the clipping region is removed.

Input
    X1 = the world x-coordinate of the point 1.
    Y1 = the world y-coordinate of the point 1.
    X2 = the world x-coordinate of the point 2.
    Y2 = the world y-coordinate of the point 2.
     M = 1: AND
         2: OR
         3: DIFF
         4: XOR
 otherwise: COPY

Output
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

59. Set Pixel
*******************************************************************************
[F] SUBROUTINE GWSETPXL(IRTN, X, Y, K)
    REAL,INTENT(IN) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: K

[C] int GWsetpxl(float X, float Y, int K);
-------------------------------------------------------------------------------
Description
    Set the logical color value to the pixel at the point specified by x and y.

Input
   X = the world x-coordinate of the point
   Y = the world y-coordinate of the point
   K = the logical color value

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

60. Get Pixel
*******************************************************************************
[F] SUBROUTINE GWGETPXL(IRTN, X, Y)
    REAL,INTENT(IN) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWgetpxl(float X, float Y);
-------------------------------------------------------------------------------
Description
    Retrieve the logical color value of the pixel at the point specified by x
    and y.

Input
   X = the world x-coordinate of the point
   Y = the world y-coordinate of the point

Output
 IRTN = the logical color value (if succeeded)
      = -1 (if failed)
_______________________________________________________________________________
[TOC] [INDEX]

61. Set Color
*******************************************************************************
[F] SUBROUTINE GWCOLOR(IRTN, K, IDST)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: K, IDST

[C] int GWcolor(int K, int IDST);
-------------------------------------------------------------------------------
Description
   Set a color specified by the logical color value (LCV) K to the destination
   IDST.  If the value of the destination IDST is equal to one of the available
   custom color indices (> 35, 0x08000000..0x08ffffff) the value K is set to
   the entry as a COLORREF value. No object to change a custom palette entry is
   saved.  When K = -1 a color-selection dialog box is popped up, and the
   selected color is set to the destination.  The LCV's are defined as follows:

            0..19 : reserved by Windows
                0 : GWC_BLACK
                1 : GWC_DARKRED
                2 : GWC_DARKGREEN
                3 : GWC_DARKYELLOW
                4 : GWC_DARKBLUE
                5 : GWC_DARKMAGENTA
                6 : GWC_DARKCYAN
                7 : GWC_LIGHTGRAY
                8 : GWC_MONEYGREEN
                9 : GWC_SKYBLUE
               10 : GWC_CREAM
               11 : GWC_MEDIUMGRAY
               12 : GWC_DARKGRAY
               13 : GWC_RED
               14 : GWC_GREEN
               15 : GWC_YELLOW
               16 : GWC_BLUE
               17 : GWC_MAGENTA
               18 : GWC_CYAN
               19 : GWC_WHITE
           20..35 : custom colors made by a color-selection dialog box, which
                    can be popped up from [Options] -> [Color] at the menu bar.
           36..   : indices mapped to the custom palette entries; 0x08000000..

       0x02000000
     ..0x02ffffff : palette-relative RGB specifiers ("PALETTERGB[W]")

       0x08000000
     ..0x08ffffff : entries of the custom palette (see  GWPALETTE)

               -1 : color specified by a color-selection dialog box
               -2 : GWC_FGCOLOR     (current foreground color)
               -3 : GWC_BKCOLOR     (current background color)
               -4 : GWC_PENCOLOR    (current pen color)
               -5 : GWC_BRUSHCOLOR  (current brush color)
               -6 : GWC_MARKCOLOR   (current mark color)
               -7 : GWC_MARKBKCOLOR (current mark-background color)
               -8 : GWC_TEXTCOLOR   (current text color)
               -9 : GWC_TEXTBKCOLOR (current text-background color)
              -10 : GWC_SYMCOLOR    (current symbol color)
              -11 : GWC_SYMBKCOLOR  (current symbol-background color)
              -12 : GWC_PXLCOLOR    (current pixel color)
             -100 : GWC_TRANSPARENT (transparent; for background colors)
           others : color specified by a color-selection dialog box

Input
       K = logical color value (LCV)
    IDST = destination
                 1: GWD_FGCOLOR     (foreground color)
                 2: GWD_BKCOLOR     (background color)
                 3: GWD_PENCOLOR    (pen color)
                 4: GWD_BRUSHCOLOR  (brush color)
                 5: GWD_MARKCOLOR   (mark color)
                 6: GWD_MARKBKCOLOR (mark-background color)
                 7: GWD_TEXTCOLOR   (text color)
                 8: GWD_TEXTBKCOLOR (text-background color)
                 9: GWD_SYMCOLOR    (symbol color)
                10: GWD_SYMBKCOLOR  (symbol-background color)
                11: GWD_PXLCOLOR    (pixel color)
            20..35: custom colors (0..15)
            36..  : mapped to the custom palette entries; 0x08000000..

       0x08000000
     ..0x08ffffff : entries of the custom palette (see  GWPALETTE)

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

62. Get RGB
*******************************************************************************
[F] SUBROUTINE GWGETRGB(IRTN, K, IR, IG, IB)
    INTEGER,INTENT(OUT) :: IRTN, IR, IG, IB
    INTEGER,INTENT(IN) :: K

[C] int GWgetrgb(int K, int *IR, int *IG, int *IB);
-------------------------------------------------------------------------------
Description
    Translate a logical color value to RGB.

Input
    K = the logical color value

Output
   IR = the intensity of the red color (0-255).
   IG = the intensity of the green color (0-255).
   IB = the intensity of the blue color (0-255).
 IRTN = COLORREF value
_______________________________________________________________________________
[TOC] [INDEX]

63. Set RGB
*******************************************************************************
[F] FUNCTION KRGB(IR, IG, IB)
    INTEGER KRGB
    INTEGER,INTENT(IN) :: IR, IG, IB

[C] int GWkrgb(int IR, int IG, int IB);
-------------------------------------------------------------------------------
Description
   Translate the RGB value specified by (IR, IG, IB) into the corresponding
   logical color value.   This may be used, for example, GWSETPEN and GWSETBRS,
   which require logical color values as an input parameter.   The logical
   color value is an internal representation of colors in the GrWin Library
   (see GWCOLOR).

Input
  IR = the intensity of the red color (0-255).
  IG = the intensity of the green color (0-255).
  IB = the intensity of the blue color (0-255).

Output
   None

Return value
    the resultant logical color value (see GWCOLOR)
_______________________________________________________________________________
[TOC] [INDEX]

64. Get COLORREF value
*******************************************************************************
[F] FUNCTION KCOLOR(IC)
    INTEGER KCOLOR
    INTEGER,INTENT(IN) :: IC

[C] int GWkcolor(int IC);
-------------------------------------------------------------------------------
Description
   Translate the COLORREF value specified by IC into the corresponding logical
   color value.   COLORREF is 32-bit values used as color values in Windows,
   in the following hexadecimal form as 0x00bbggrr, where 0xbb, 0xgg and 0xrr
   are intensities of the blue, green and red colors, respectively.   The
   logical color value is an internal representation of colors in the GrWin
   Library (see GWCOLOR).

Input
  IC = COLORREF value to be transformed

Output
   None

Return value
    the resultant logical color value (see GWCOLOR)
_______________________________________________________________________________
[TOC] [INDEX]

65. Get COLORREF value
*******************************************************************************
[F] FUNCTION IGWCOLOR(K)
    INTEGER IGWCOLOR
    INTEGER,INTENT(IN) :: K

[C] int GWgetcolor(int K);
-------------------------------------------------------------------------------
Description
   Returns the CORORREF value to the specified logical color value (LCV) K.

Input
  K = logical color value (see GWCOLOR)

Output
   None

Return value
    CORORREF value (see GWCOLOR)
_______________________________________________________________________________
[TOC] [INDEX]

66. Get Max Index of the Palette
*******************************************************************************
[F] SUBROUTINE GWNCOLOR(IRTN)
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWncolor(void);
-------------------------------------------------------------------------------
Description
   Get the largest value of the available indices to the current custom palette.
   When no custom palette is available this routine returns the value 35 for the
   Windows palette.

Input
   None

Output
   IRTN = the largest index of the current palette
_______________________________________________________________________________
[TOC] [INDEX]

67. Save Custom Color
*******************************************************************************
[F] SUBROUTINE GWSAVECC(IRTN, FN)
    INTEGER,INTENT(OUT) :: IRTN
    CHARACTER,INTENT(IN) :: FN*(*)

[C] int GWsavecc(char *FN, int l);
-------------------------------------------------------------------------------
Description
   Save the Windows custom color table into a file

Input
  FN = file name
   l = byte length of FN if FN is a string buffer, 0 otherwise ([C])

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

68. Load Custom Color
*******************************************************************************
[F] SUBROUTINE GWLOADCC(IRTN, FN)
    INTEGER,INTENT(OUT) :: IRTN
    CHARACTER,INTENT(IN) :: FN*(*)

[C] int GWloadcc(char *FN, int l);
-------------------------------------------------------------------------------
Description
   Restore the Windows custom color table from a file.   The file consists of
   16 lines, and each line has the form of "0x02bbggrr" as a string, where
   0x00bbggrr is the COLORREF value of the entry.   Any file created with
   GWSAVECC can be loaded as is by this routine.

Input
  FN = file name
   l = byte length of FN if FN is a string buffer, 0 otherwise ([C])

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

69. Get System Color
*******************************************************************************
[F] SUBROUTINE GWSYSCLR(IRTN, IDX)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IDX

[C] int GWsysclr(int IDX);
-------------------------------------------------------------------------------
Description
   Get system color information specified.   To know details of the system
   color, refer to documents about GetSysColor() of Win32 API.

Input
  IDX = 0: GWS_SCROLLBAR
        1: GWS_BACKGROUND
        2: GWS_ACTIVECAPTION
        3: GWS_INACTIVECAPTION
        4: GWS_MENU
        5: GWS_WINDOW
        6: GWS_WINDOWFRAME
        7: GWS_MENUTEXT
        8: GWS_WINDOWTEXT
        9: GWS_CAPTIONTEXT
       10: GWS_ACTIVEBORDER
       11: GWS_INACTIVEBORDER
       12: GWS_APPWORKSPACE
       13: GWS_HIGHLIGHT
       14: GWS_HIGHLIGHTTEXT
       15: GWS_BTNFACE
       16: GWS_BTNSHADOW
       17: GWS_GRAYTEXT
       18: GWS_BTNTEXT
       19: GWS_INACTIVECAPTIONTEXT
       20: GWS_BTNHIGHLIGHT

Output
  IRTN = CORORREF values (Windows)
_______________________________________________________________________________
[TOC] [INDEX]

70. Create Custom Palette
*******************************************************************************
[F] SUBROUTINE GWPALETTE(IRTN, IARRAY, NENTRY)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IARRAY(*)
    INTEGER,INTENT(IN) :: NENTRY

[C] int GWpalette(int *IARRAY, int NENTRY);
-------------------------------------------------------------------------------
Description
   Creates a custom palette of the length specified by NENTRY. If an old custom
   palette exists, the old one is removed.  The value of NENTRY could be 0 to
   remove the existent custom palette if any. Each enytry of the custom palette
   must be a proper COLORREF value.

Input
  NENTRY = the number of the entries of the custom palette (< 65537)
  IARRAY = the array for the custom palette entries

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

71. Offset Custom Palette
*******************************************************************************
[F] SUBROUTINE GWPOFFSET(IRTN, IOFST)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IOFST

[C] int GWpoffsetl(int IOFST);
-------------------------------------------------------------------------------
Description
   Set the offset value for the custom palette. The value is effective only in
   drawing bitmaps that use the custom palette.

Input
  IOFST = the offset value for the custom palette

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

72. Capture Point
*******************************************************************************
[F] SUBROUTINE GWCAPPNT(IRTN, X, Y, TEXT)
    REAL,INTENT(OUT) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN
    CHARACTER,INTENT(IN) :: TEXT*(*)

[C] int GWcappnt(float *X, float *Y, char *TEXT, int l);
-------------------------------------------------------------------------------
Description
   Wait for the left mouse button turned down, and retrieve the world x, y
   coordinates and the logical color (see GWCOLOR) value of the point.

Input
   TEXT = a string to be notified at the status bar.

Output
 IRTN = the logical color value ( -1 if failed )
    X = the world x-coordinate of the point
    Y = the world y-coordinate of the point
_______________________________________________________________________________
[TOC] [INDEX]

73. Capture Vector
*******************************************************************************
[F] SUBROUTINE GWCAPVEC(IRTN, X1, Y1, X2, Y2, TEXT)
    REAL,INTENT(IN) :: X1, Y1
    REAL,INTENT(OUT) :: X2, Y2
    INTEGER,INTENT(OUT) :: IRTN
    CHARACTER,INTENT(IN) :: TEXT*(*)

[C] int GWcapvec(float X1, float Y1, float *X2, float *Y2, char *TEXT, int l);
-------------------------------------------------------------------------------
Description
   Giving the coordinates of a beginning point as inputs, wait for the left
   mouse button turned down, and retrieve the world x, y coordinates.   In
   capturing, a rubber band connecting the beginning point and the current
   mouse pointer is displayed.

Input
   TEXT = a string to be notified at the status bar.
   X1 = the world x-coordinate of the beginning point
   Y1 = the world y-coordinate of the beginning point

Output
 IRTN = 1: the left button was pushed to get the end point
      = 2: the right button was pushed to get the end point
      = 3: the middle  button was pushed to get the end point
     <= 0: otherwise
   X2 = the world x-coordinate of the end point
   Y2 = the world y-coordinate of the end point
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

74. Capture Line
*******************************************************************************
[F] SUBROUTINE GWCAPLIN(IRTN, X1, Y1, X2, Y2, TEXT)
    REAL,INTENT(OUT) :: X1, Y1, X2, Y2
    INTEGER,INTENT(OUT) :: IRTN
    CHARACTER,INTENT(IN) :: TEXT*(*)

[C] int GWcaplin(float *X1, float *Y1, float *X2, float *Y2, char *TEXT, int l);
-------------------------------------------------------------------------------
Description
   Wait for the end of mouse dragging, and return the coordinates of the
   beginning point, where the left mouse button is turned down, and the end
   point, where the left mouse button is released.   In dragging, a rubber band
   connecting between the beginning point and the current mouse pointer is
   displayed, and the dragging can be canceled by the right mouse button.

Input
   TEXT = a string to be notified at the status bar.

Output
 IRTN > 0: succeeded
     <= 0: canceled
   X1 = the world x-coordinate of the beginning point
   Y1 = the world y-coordinate of the beginning point
   X2 = the world x-coordinate of the end point
   Y2 = the world y-coordinate of the end point
 IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

75. Capture Rectangle
*******************************************************************************
[F] SUBROUTINE GWCAPRECT(IRTN, X1, Y1, X2, Y2, TEXT)
    REAL,INTENT(OUT) :: X1, Y1, X2, Y2
    INTEGER,INTENT(OUT) :: IRTN
    CHARACTER,INTENT(IN) :: TEXT*(*)

[C] int GWcaprect(float *X1, float *Y1, float *X2, float *Y2, char *TEXT, int l);
-------------------------------------------------------------------------------
Description
   Wait for the end of mouse dragging followed by the right mouse button turned
   down.   The coordinates of the beginning point, where the left mouse button
   is turned down, and the end point, where the left mouse button is released,
   are returned.   In dragging, a rectangular rubber band whose diagonal is the
   pair of the beginning point and the current mouse pointer is displayed, and
   the dragging can be canceled by the right mouse button.   Until the right
   mouse button is turned down after dragging the rectangle to be captured can
   be changed by dragging a corner of the rectangular rubber band displayed.

Input
   TEXT = a string to be notified at the status bar.

Output
 IRTN != 0: succeeded
       = 0: canceled
    X1 = the world x-coordinate of the beginning point
    Y1 = the world y-coordinate of the beginning point
    X2 = the world x-coordinate of the end point
    Y2 = the world y-coordinate of the end point
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

76. Load Bitmap
*******************************************************************************
[F] SUBROUTINE GWLOADBMP(IRTN, NB, FN)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NB
    CHARACTER,INTENT(IN) :: FN*(*)

[C] int GWloadbmp(int NB, char *FN, int l);
-------------------------------------------------------------------------------
Description
    Load a bitmap from a bitmap file (*.bmp) with bitmap number NB.  When NB = 0
    unused array element is used.   Maximun number of registered bitmaps depends
    on amount of available system resources though is not restricted.  It
    should be noted that no test has been done for the case where available
    system resources are exhausted.

Input
    NB = bitmap number (>0) or 0 to use unused array element.
    FN = bitmap file name (the bitmap file must be in the same directory as the
         exe file for the application unless specified as full path).
     l = byte length of FN if FN is a string buffer, 0 otherwise ([C])

Output
  IRTN = bitmap number used (>0), or 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

77. Save Bitmap
*******************************************************************************
[F] SUBROUTINE GWSAVEBMP(IRTN, NB, FN)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NB
    CHARACTER,INTENT(IN) :: FN*(*)

[C] int GWsavebmp(int NB, char *FN, int l);
-------------------------------------------------------------------------------
Description
    Save the bitmap specified by NB to a bitmap file.

Input
    NB = bitmap number
    FN = bitmap file name
     l = byte length of FN if FN is a string buffer, 0 otherwise ([C])

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

78. Make Bitmap
*******************************************************************************
[F] SUBROUTINE GWMAKEBMP(IRTN, NB, IW, IH, IBC, IBITS)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NB, IW, IH, IBC, IBITS(*)

[C] int GWmakebmp(int NB, int IW, int IH, int IBC, int *IBITS);
-------------------------------------------------------------------------------
Description
    Make a bitmap using bitmap data stored in the array IBITS with the bitmap
    number NB.   When NB = 0 unused array element is used.   If an invalid
    value is set to IBC the default value is used.

Input
    NB =  bitmap number (>0)
    IW =  width of the bitmap(pixel)
    IH =  height of the bitmap(pixel)
   IBC =  color depth per pixel(bits per pixel)
       =  1: monochrome(1 bit)
       = -1: monochrome(1 bit: uses the custom palette)
       =  4: 16 colors (4 bits)
       = -4: 16 colors (4 bits: uses the custom palette)
       =  8: 256 colors (8 bits: default)
       = -8: 256 colors (8 bits: uses the custom palette)
       = 16: 2^16 colors (16 bits)
       = 24: 2^24 colors (24 bits)
       = 32: 2^32 colors (32 bits)
 IBITS =  the bitmap data
          the logical color value of the pixels [i,j] are stored to
             IBITS(i+IW*j+1)    : [F}
          or
             IBITS[i+IW*j]      : [C]
          where the origin [0,0] is assumed at the top-left corner of the
          bitmap, and i = 0..IW-1 and j = 0..IH-1.

Output
  IRTN =  bitmap number used (>0), or 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

79. Peek Bitmap Data
*******************************************************************************
[F] SUBROUTINE GWPEEKBMP(IRTN, NB, IXY, LEN, IBC, IBITS)
    INTEGER,INTENT(OUT) :: IRTN, IBC, IBITS(*)
    INTEGER,INTENT(IN) :: NB, IXY, LEN

[C] int GWpeekbmp(int NB, int IXY, int LEN, int *IBC, int *IBITS);
-------------------------------------------------------------------------------
Description
    Peeks bitmap data from a bitmap specified with the bitmap number NB into
	the array IBITS by scanning as row-wise.

Input
    NB = bitmap number (>=0)
   IXY = i+IW*j: IW = the width ofth bitmap, [i,j] = the begining point of
         the scanning with the point [0,0] of the upper left corner
   LEN = the number of pixels to be peeked

Output
   IBC = color depth per pixel(bits per pixel)
       = 1: monochrome(1 bit)
       = 4: 16 colors (4 bits)
       = 8: 256 colors (8 bits: default)
       = 16: 2^16 colors (16 bits)
       = 24: 2^24 colors (24 bits)
       = 32: 2^32 colors (32 bits)
 IBITS = the bitmap data (in COLORREF values)
  IRTN = number of pixels peeked (>0), or 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

80. Poke Bitmap Data
*******************************************************************************
[F] SUBROUTINE GWPOKEBMP(IRTN, NB, IXY, LEN, MX, IBITS)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NB, IXY, LEN, MX, IBITS(*)

[C] int GWpokebmp(int NB, int IXY, int LEN, int MX, int *IBITS);
-------------------------------------------------------------------------------
Description
    Pokes bitmap data stored in the array IBITS into an existing bitmap of the
    bitmap number NB by scanning as row-wise. A negative value is specified to
    IXY, LEN or MX a default value is used.

Input
    NB = bitmap number (>0)
   IXY = i+IW*j: IW = the width ofth bitmap, [i,j] = the begining point of
         the scanning with the point [0,0] of the upper left corner
   LEN = the number of pixels to be peeked
    MX = bitmap-mix mode (see GWSETBMP). When the transparent color (see
	     GWSETBMP) is set to the destination bitmap, the pattern bit [P] for
		 the ROP3 code is assumed to be 1 if the color of the destination
		 pixel is the same as the transparent color, and to be 0 otherwise.
		 The low-order word (16 bits) of the corresponding ROP3 code is
		 ignored.
 IBITS = the bitmap data
         the logical color value of the pixels [i,j] are stored to
             IBITS(i+IW*j+1)    : [F}
         or
             IBITS[i+IW*j]      : [C]
         where the origin [0,0] is assumed at the top-left corner of the
         bitmap, and i = 0..IW-1 and j = 0..IH-1.

Output
  IRTN = bitmap number used (>0), or 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

81. Make Bitmap from Font
*******************************************************************************
[F] SUBROUTINE GWFNT2BMP(IRTN, NB, IW, IH, IU, IV, TEXT)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NB, IW, IH, IU, IV
    CHARACTER,INTENT(IN) :: TEXT*(*)

[C] int GWfnt2bmp(int NB, int IW, int IH, int IU, int IV, char *TEXT, int l);
-------------------------------------------------------------------------------
Description
    Make a bitmap with the bitmap number NB from a text string using the
    current text font.  When NB = 0 unused array element is used.

Input
   NB = bitmap number (>0)
   IW = width of the bitmap(pixel)
   IH = height of the bitmap(pixel)
   IU = offset of the reference point to the right(pixel)
   IV = offset of the reference point to the bottom(pixel)
 TEXT = the string
    l = byte length of TEXT if TEXT is a string buffer, 0 otherwise ([C])

Output
  IRTN = bitmap number used (>0), or 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

82. Set Bitmap Attributes
*******************************************************************************
[F] SUBROUTINE GWSETBMP(IRTN, NB, W, H, MX, ITR, IOF)
    REAL,INTENT(IN) :: W, H
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NB, MX, ITR, IOF

[C] int GWsetbmp(int NB, float W, float H, int MX, int ITR, int IOF);
-------------------------------------------------------------------------------
Description
    Set drawing attributes for a registered bitmap of the bitmap number NB.
    The bitmap number NB = 0 is reserved for a bitmap imported from the
    clipboard [W].  When W = H = 0, the original bitmap size in pixels are
    assumed in the LDCS. Bitmap-mix modes MX define how colors are combined in
    output operations that involve a current brush, a possible source bitmap,
    and a destination bitmap. When MX > 15, the value is used as the "ternary
    raster-operation code(ROP3)[W]".   When ITR > 0 the value specifies the
    transparent color, which becomes transparent.  The parameter IOF specifies
    the reference point of the bit map.   When a parameter has a negative value
    the corresponding attribute is not changed.

Input
    NB = bitmap number to be drawn
     W = width of the bitmap in the world coordinate system
     H = height of the bitmap in the world coordinate system
    MX = 0 ... 15 : bitmap-mix mode (see below)
       > 15 :  (MX - 16) = "ternary raster-operation code[W]"
   ITR = transparent mode flag
       = 0: non transparent mode (the bitmap is drawn as a rectangle)
       = 1: transparent mode (white pixels in the bitmap becomes transparent)
       > 1: (a positive logical color value) + 2 for the transparent color
            ex. 2 => black
   IOF = set the reference point at
       = 0: GWO_CENTER      (center; default)
       = 1: GWO_BOTTOMLEFT  (bottom-left)
       = 2: GWO_BOTTOMRIGHT (bottom-right)
       = 3: GWO_TOPRIGHT    (top-right)
       = 4: GWO_TOPLEFT     (top-left)
       = 5: GWO_LEFT        (left)
       = 6: GWO_BOTTOM      (bottom)
       = 7: GWO_RIGHT       (right)
       = 8: GWO_TOP         (top)

    bitmap-mix mode (see "ternary raster-operation code[W]")
        0: GWY_INVERTNOT = source XOR (NOT dest)
            Inverts the destination bitmap and combines the result with the
            source bitmap using the Boolean XOR operator.
        1: GWY_SRCCOPY = source
            Copies the source bitmap to the destination bitmap.
        2: GWY_SRCPAINT = source OR dest
            Combines pixels of the destination and source bitmaps using the
            Boolean OR operator.
        3: GWY_SRCAND = source AND dest
            Combines pixels of the destination and source bitmaps using the
            Boolean AND operator.
        4: GWY_SRCINVERT= source XOR dest
            Combines pixels of the destination and source bitmaps using the
            Boolean XOR operator.
        5: GWY_SRCERASE = source AND (NOT dest )
            Inverts the destination bitmap and combines the result with the source
            bitmap using the Boolean AND operator.
        6: GWY_NOTSRCCOPY = (NOT source)
            Copies the inverted source bitmap to the destination.
        7: GWY_NOTSRCERASE = (NOT src) AND (NOT dest)
            Inverts the result of combining the destination and source bitmaps
            using the Boolean OR operator.
        8: GWY_MERGECOPY = (source AND pattern)
            Combines the pattern and the source bitmap using the Boolean AND
            operator.
        9: GWY_MERGEPAINT = (NOT source) OR dest
            Combines the inverted source bitmap with the destination bitmap using
            the Boolean OR operator.
       10: GWY_PATCOPY = pattern
            Copies the pattern to the destination bitmap.
       11: GWY_PATPAINT = DPSnoo
            Combines the inverted source bitmap with the pattern using the
            Boolean OR operator. Combines the result of this operation with
            the destination bitmap using the Boolean OR operator.
       12: GWY_PATINVERT = pattern XOR dest
           Combines the destination bitmap with the pattern using the Boolean XOR
           operator.
       13: GWY_DSTINVERT = (NOT dest)
           Inverts the destination bitmap.
       14: GWY_BLACKNESS = BLACK
           Turns all outset black.
       15: GWY_WHITENESS = WHITE
           Turns all outset white.

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

83. Get Bitmap Attributes
*******************************************************************************
[F] SUBROUTINE GWGETBMP(IRTN, NB, W, H, IW, IH, IB, MAXNB, FN)
    REAL,INTENT(OUT) :: W, H
    INTEGER,INTENT(OUT) :: IRTN, IW, IH, IB, MAXNB
    INTEGER,INTENT(IN) :: NB
    CHARACTER :: FN*(*)

[C] int GWgetbmp(int NB, float *W, float *H, int *IW, int *IH,
		int *NC, int *MAXNB, char *FN, int l);
-------------------------------------------------------------------------------
Description
    Get bitmap attributes.  When failed, by specifying an invalid bitmap number
	for example, only the output value of MAXNB is available.

Input
    NB = bitmap number (>0), or 0 for imported clipboard obtained by [Edit] ->
         [Import Clipboard] on the menu bar.
     l = byte length of the buffer FN for output ([C])

Output
     W = width of the bitmap in the world coordinate
     H = height of the bitmap in the world coordinate
    IW = width of the bitmap in pixels
    IH = height of the bitmap in pixels
    IB = the number of bits per pixel
 MAXNB = the maximum bitmap number of the registered bitmaps
    FN = bitmap file name.  It is neglected when FN == NULL ([C]) or the length
         of the FN is insufficient to retrieve the file name.
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

84. Draw Bitmap
*******************************************************************************
[F] SUBROUTINE GWPUTBMP(IRTN, NB, X, Y, IBK)
    REAL,INTENT(IN) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NB, IBK

[C] int GWputbmp(int NB, float X, float Y, int IBK);
-------------------------------------------------------------------------------
Description
    Draw a registered bitmap NB at the point (X, Y) with attributes set by
    GWSETBMP.  The parameter IBK is the switches (1 = on | 0 = off) for
    Restoring(R) and Saving(S) the background of the bitmap and for Drawing(D)
    the bitmap. Saving the background before drawing a bitmap and restoring it,
    that is clearing the bitmap, before the next drawing, a simple animation
    can be made.

Input
    NB = bitmap number to be drawn
     X = the world x-coordinate of the reference point of the bitmap
     Y = the world y-coordinate of the reference point of the bitmap
   IBK = R*4 + S*2 + D*1
         R = switch for restoring the background before the drawing
         S = switch for saving the background before the drawing
         D = switch for drawing the bitmap

   ex) IBK = 7: restoring (clearing) > saving > drawing
       IBK = 4: restoring (clearing) only

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

85. Copy Registered Bitmap
*******************************************************************************
[F] SUBROUTINE GWCOPYBMP(IRTN, NB1, NB2)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NB1, NB2

[C] int GWcopybmp(int NB1, int NB2);
-------------------------------------------------------------------------------
Description
    Copy the registered bitmap of the bitmap number NB1 to of the bitmap
    number NB2.

Input
  NB1 = bitmap number of the bitmap to be copied
  NB2 = destination bitmap number (>0), or NB = 0 for using unused array element.
Output
  IRTN = bitmap number used (>0), or 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

86. Delete Bitmap
*******************************************************************************
[F] SUBROUTINE GWDELBMP(IRTN, NM)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NM

[C] int GWdelbmp(int NM);
-------------------------------------------------------------------------------
Description
    Deletes the registration of the bitmap of the bitmap number NM.   If the
    spesified bitmap number is not registered, nothing is done.

Input
  NM = bitmap number of the bitmap to be deleted

Output
  IRTN = bitmap number deleted (>0), or 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

87. Capture Image
*******************************************************************************
[F] SUBROUTINE GWCAPIMG(IRTN, NB, X1, Y1, X2, Y2)
    REAL,INTENT(IN) :: X1, Y1, X2, Y2
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NB

[C] int GWcapimg(int NB, float X1, float Y1, float X2, float Y2);
-------------------------------------------------------------------------------
Description
    Capture image of a rectangular area specified by a pair of two diagonal
    points (X1,Y1) and (X2,Y2) into an element of the internal bitmap array.
    The array element can be specified with the bitmap number NB.   When
    NB = 0 is specified, an unused element will be used.   If the specified
    rectangle has no area the bounding rectangle for the current window is
    assumed.

Input
   NB = bitmap number (>=0)
   X1 = the world x-coordinate of the point 1.
   Y1 = the world y-coordinate of the point 1.
   X2 = the world x-coordinate of the point 2.
   Y2 = the world y-coordinate of the point 2.

Output
 IRTN = bitmap number used (>0), or 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

88. Copy To Clipboard
*******************************************************************************
[F] SUBROUTINE GWCLIPIMG(IRTN, X1, Y1, X2, Y2)
    REAL,INTENT(IN) :: X1, Y1, X2, Y2
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWclipimg(float X1, float Y1, float X2, float Y2);
-------------------------------------------------------------------------------
Description
    Copy rectangular area specified by a pair of diagonal points (X1,Y1) and
    (X2,Y2) into the Windows clipboard and also into an array element with the
    bitmap number NB = 0.  If the specified rectangle has no area the bounding
    rectangle for the current window is assumed.

Input
   X1 = the world x-coordinate of the point 1.
   Y1 = the world y-coordinate of the point 1.
   X2 = the world x-coordinate of the point 2.
   Y2 = the world y-coordinate of the point 2.

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

89. Load Metafile
*******************************************************************************
[F] SUBROUTINE GWLOADEMF(IRTN, NM, FN)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NM
    CHARACTER,INTENT(IN) :: FN*(*)

[C] int GWloademf(int NM, char *FN, int l);
-------------------------------------------------------------------------------
Description
    Loads an EMF (Enhanced MetaFile) from a file FN, and registers it with an
	EMF number NM. The EMF is a widely used data and/or file format for Windows,
	whose default file extention is *.emf. An EMF is composed of a set of
	graphic objects, and a registered EMF can be used to draw the objects
	included any number of times with different sizes.  Maximun number of
	registered EMFs depends on the amount of the available system resources.
	It should be noticed that no test has been done for the case where available
	system resources are exhausted.

Input
    NM = an EMF number (>0), or 0 to use unused array element.
    FN = the name of the file to be loaded (the file must be in the same
	     directory as your application unless specified in full path).

Output
  IRTN = the EMF number successfully registered (>0), or 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

90. Save EMF as File
*******************************************************************************
[F] SUBROUTINE GWSAVEEMF(IRTN, NM, FN)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NM
    CHARACTER,INTENT(IN) :: FN*(*)

[C] int GWsaveemf(int NM, char *FN, int l);
-------------------------------------------------------------------------------
Description
    Save an EMF as a file.

Input
    NM = EMF number
    FN = file name

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

91. Create Mark as EMF
*******************************************************************************
[F] SUBROUTINE GWEMFMRK(IRTN, NM, MT, S, K, KB, MX)
    REAL,INTENT(IN) :: S
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NM, MT, K, KB, MX

[C] int GWemfmrk(int NM, int MT, float S, int K, int KB, int MX);
-------------------------------------------------------------------------------
Description
   Creates a mark (see GWSETMRK) as an EMF of the EMF number NM with using
   mark number MT, size S in world coordinate, logical mark color K, logical
   background mark color KB, and the mix mode MX.  The mark attributes (see
   GWSETMRK) are unchanged.   If a specified parameter is invalid, the
   corresponding current mark attribute is used.  When NM = 0 or the specified
   EMF number is already in use, an available number is used instead.

Input
   NM = EMF number
   MT = 0: GWM_DOT          (dot)
        1: GWM_SOLIDSQUARE  (solid square)
        2: GWM_PLUS         (+)
        3: GWM_TIMES        (x)
        4: GWM_ASTERISK     (superposition of + and X)
        5: GWM_SQUARE       (filled square)
        6: GWM_CIRCLE       (filled circle)
    S = height in the world coordinate >= 0.0
    K = logical mark color value (see GWCOLOR)
      = -1: the current mark color
   KB = logical mark background color value (see GWCOLOR)
      = -1: the current mark background color
   MX = mix mode for the mark (see GWSETPEN)

Output
  IRTN = the EMF number of the one created
_______________________________________________________________________________
[TOC] [INDEX]

92. Begin Making an EMF
*******************************************************************************
[F] SUBROUTINE GWBEGINEMF(IRTN, NM, W, H)
    REAL,INTENT(IN) :: W, H
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NM

[C] int GWbeginemf(int NM, float W, float H);
-------------------------------------------------------------------------------
Description
    Begins making an EMF (Extended Meta File), a set of graphic objects, on
	memory and reserves the EMF number NM for later uses.   When NM = 0 an
	unused array element is used.   The EMF being made with the reserved EMF
	number cannot be used until it is successfully closed by GWENDEMF.  An EMF
	can be used to draw a set of objects as an object, and can be saved in a file.

Input
    NM = EMF number (>0)
     W = width of the EMF ( > 0: world coordinate)
     H = height of the EMF ( > 0: world coordinate)

Output
  IRTN = the reserved EMF number (>0), or 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

93. End Making an EMF
*******************************************************************************
[F] SUBROUTINE GWENDEMF(IRTN)
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWendemf(void);
-------------------------------------------------------------------------------
Description
    Ends making an EMF and registers it to make the EMF available for drawings.

Input
    none

Output
  IRTN = the EMF number successfully registered (>0), or 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

94. Draw EMF
*******************************************************************************
[F] SUBROUTINE GWPUTEMF(IRTN, NM, X, Y, W, H, IOF)
    REAL,INTENT(IN) :: X, Y, W, H
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NM, IOF

[C] int GWputemf(int NM, float X, float Y, float W, float H, int IOF);
-------------------------------------------------------------------------------
Description
    Draws a registered EMF of the number NM at the point (X, Y) with the width
	W and the height H.  If W == 0.0 or H == 0.0 the corresponding size on
	generated are used.  The parameter IOF specifies the reference point about
	the bounding rectangle of the EMF.

Input
    NM = the EMF number to be drawn
     X = the world x-coordinate of the reference point of the EMF
     Y = the world y-coordinate of the reference point of the EMF
     W = width of the bitmap in the world coordinate system
     H = height of the bitmap in the world coordinate system
   IOF = set the reference point at
       = 0: GWO_CENTER      (center; default)
       = 1: GWO_BOTTOMLEFT  (bottom-left)
       = 2: GWO_BOTTOMRIGHT (bottom-right)
       = 3: GWO_TOPRIGHT    (top-right)
       = 4: GWO_TOPLEFT     (top-left)
       = 5: GWO_LEFT        (left)
       = 6: GWO_BOTTOM      (bottom)
       = 7: GWO_RIGHT       (right)
       = 8: GWO_TOP         (top)

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

95. Get Attributes of EMF
*******************************************************************************
[F] SUBROUTINE GWGETEMF(IRTN, NM, II, IX1, IY1, IX2, IY2, MAXNM, FN)
    INTEGER,INTENT(OUT) :: IRTN, IX1, IY1, IX2, IY2, MAXNM
    INTEGER,INTENT(IN) :: NM, II
    CHARACTER :: FN*(*)

[C] int GWgetemf(int NM, int II, int *IX1, int *IY1, int *IX2, int *IY2,
		int *MAXNM, char *FN, int l);
-------------------------------------------------------------------------------
Description
    Gets attributes of an EMF.  If an unregistered or invalid value is
    specified for NM, only the value of MAXNM is returned.

Input
    NM = EMF number (>0).
     l = byte length of the string buffer FN ([C])

Output
 case II = 0:
     IX1 = width of the bounding rectangle in deveice units
     IY1 = height of the bounding rectangle in deveice units
     IX2 = width of the EMF in 0.01 mm units
     IY2 = height of the EMF in 0.01 mm units
 case II = 1:
     IX1 = width of the reference device in pixels
     IY1 = height of the reference device in pixels
     IX2 = width of the reference device in mm units
     IY2 = height of the reference device in mm units
 case II = 2:
  (IX1, IY1, IX2, IY2) = the bounding rectangle in deveice units
 case II = 3:
   (IX1, IY1, IX2, IY2) = the rectangle of the EMF in 0.01 mm units
 MAXNM = the maximum EMF number of the registered EMFs
    FN = metafile name.  If FN == NULL ([C]) or the length of the FN is
    insufficient to retrieve the file name, no value returns.
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

96. Copy Registered EMF
*******************************************************************************
[F] SUBROUTINE GWCOPYEMF(IRTN, NM1, NM2)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NM1, NM2

[C] int GWcopyemf(int NM1, int NM2);
-------------------------------------------------------------------------------
Description
    Copy registered EMF of the EMF number NM1 to one with the EMF number NM2.

Input
  NM1 = EMF number of the EMF to be copied
  NM2 = destination EMF number (>0), or NM = 0 for using unused array
        element.
Output
  IRTN = EMF number used (>0), or 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

97. Delete EMF
*******************************************************************************
[F] SUBROUTINE GWDELEMF(IRTN, NM)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: NM

[C] int GWdelemf(int NM);
-------------------------------------------------------------------------------
Description
    Deletes the registration of the EMF number NM.   If the spesified EMF
    number is not used to register, nothing is done.

Input
  NM = the EMF number to be deleted

Output
  IRTN = the EMF number successfully deleted (>0), or 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

98. Input String
*******************************************************************************
[F] SUBROUTINE GWINPUT(IRTN, TITLE, TXT)
    INTEGER,INTENT(OUT) :: IRTN
    CHARACTER,INTENT(IN) :: TITLE*(*)
    CHARACTER,INTENT(OUT) :: TXT*(*)

[C] int GWinput(char *TITLE, int l1, char *TXT, int l2);
-------------------------------------------------------------------------------
Description
   Opens a dialog box to retrieve a string from keyboard.

Input
 TITLE = string to be displayed at the title bar
    l1 = byte length of TITLE if TITLE is a string buffer, 0 otherwise ([C])
    l2 = byte length of the string buffer TXT ([C])

Output
  IRTN = byte length of the string retrieved.
   TXT = the string retrieved (input is terminated by Enter).
[TOC] [INDEX]

99. Popup File Dialog
*******************************************************************************
[F] SUBROUTINE GWFILEDLG(IRTN, FN)
    INTEGER,INTENT(OUT) :: IRTN
    CHARACTER,INTENT(INOUT) :: FN*(*)

[C] int GWfiledlg(char *FN, int l);
-------------------------------------------------------------------------------
Description
    Retrieves a file name using File Dialog (Windows).  If the length of the
    specified file name, which depends on the implementation of the compiler
    used, is longer than the length of the string variable FN or l ([C]), it
    fails and the variable FN is unchanged.

Input
  FN = a filename used to initialize the File Name edit control.
   l = byte length of the string buffer FN ([C])

Output
  FN > 0: byte length of the file name retrieved.
     < 0: -(byte length of the file name specified in the dialog box > l).
     = 0: failed
 IRTN =
   FN = Retrieved file name (when succeeded).
______________________________________________________________________________
[TOC] [INDEX]

100. Load Data
*******************************************************************************
[F] SUBROUTINE GWLOAD(IRTN, IC, FN)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IC
    CHARACTER,INTENT(IN) :: FN*(*)

[C] int GWload(int IC, char *FN, int l);
-------------------------------------------------------------------------------
Description
    Loads the graphic objects from a file (*.gwd) specified with a file name
    FN.  A File Dialog pops up if failed to load with the specified file name.
    The parameter IC controls size matchings for the saved objects and
    restorations of internal parameters for a continuation of the saved job.

Input
    IC = 0: only draws the objects (no resize, no parameter restoration)
         1: draws the objects with resizes (no parameter restoration)
         2: draws the objects with parameter restorations (no resize)
 otherwise: draws the objects with resizes and parameter restorations

    FN = file name (the file must be in the same directory as the exe file for
         the application unless specified as full path).

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

101. Save Data
*******************************************************************************
[F] SUBROUTINE GWSAVEAS(IRTN, MF, MV, IW, IH, FN)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: MF, MV, IW, IH
    CHARACTER,INTENT(IN) :: FN*(*)

[C] int GWsaveas(int MF, int MV, int IW, int IH, char *FN, int l);
-------------------------------------------------------------------------------
Description
    Saves the graphics data into a named file with a file format specified by
    the parameter MF.   If the specified value MF is equal to or less than 0,
    or another invalid value is specified, the file format is determined from
    the specified file name if possible, or otherwise is assumed to be the GWD
    format, the internal format for grwnd.exe, with the extension '.gwd'
    appended.   A File Dialog pops up when the length of the file name
    specified by FN is equal to zero (or FN == NULL [C]).  The result, the
    aspect ratio and the saved area, etc., depends on the viewmode specified
    by MV and the sizes IW and IH.   When a negative value is specified for IW
    or IH the corresponding direction is reversed.    A default value is used
    for an integral parameter if the value 0 is specified for it.  This routine
    works normally in case the storing mode is set on.
Input
    MF = file format (the file extention, the unit assumed for IW and IH)
       = 1: GWF_GWD         GWD format ('.gwd', n/a)
       = 2: GWF_EMF         extended metafile format ('.emf', 0.01 mm)
       = 3: GWF_BMP         DIB (device independent bitmap) format ('.bmp', pixels)
       = 4: GWF_EPS         EPS format ('.eps', pt = 1/72")
!      = 5: GWF_JPG         JPEG format ('.jpg', pixels)
!      = 6: GWF_PNG         PNG format ('.png', pixels)
    MV = view mode
         1: GWV_BITMAP      Bitmap
         2: GWV_ISOTROPIC   Isotropic
         3: GWV_FIT         Fit
         4: GWV_TOTAL       Total
         5: GWV_ZOOM        the current view port
    IW = width (see above for the unit)
    IH = height (see above for the unit)
    FN = file name
Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

102. Print
*******************************************************************************
[F] SUBROUTINE GWPRINT(IRTN, IW, MV)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IW, MV

[C] int GWprint(int IW, int MV);
-------------------------------------------------------------------------------
Description
    Prints out a window specified with the window number IW.  When IW = 0, the
    current window is printed out.   When IW < 0 all windows opened by the
    apprication are printed out.   The view mode for the printing can be
    specified by MV.   When MV < 0, the current view mode (see GWMODE) of the
    current window is assumed.   This routine works normally in case the
    storing mode is set on.

Input
    IW = the window number to be printed
    MV = view mode
         1: Bitmap
         2: Isotropic
         3: Fit
         4: Total
         5: the current window

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

103. Set Object-Group Number
*******************************************************************************
[F] SUBROUTINE GWSETOGN(IRTN, ISRC, IDST)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: ISRC, IDST

[C] int GWsetogn(int ISRC, int IDST);
-------------------------------------------------------------------------------
Description
   The object-group number (OGN) is an attribute of an object for grouping the
   objects.  The objects having a negative OGN are stored in an internal flush
   buffer (FB) corresponding to the value of the OGN, and are suspended or not
   displayed in drawing until a flushing is made.  A flushing is made by
   turning the negative OGN of them to a positive one.  When the storing mode
   is set on (see GWMODE), objects drawn are stored or serialized in memory.
   The OGN is referred, for example, in selective erasing (GWERASE) of those
   serialized objects with the OGN.   On default the current OGN is set equal
   to 1.  The OGN = 0 is used by the system.  When the storing mode is set off
   (see GWMODE), drawn objects are not serialized and the features referring
   OGN's for serialized objects are not available, in principle.   |OGN| must
   be less than 32768.

   When ISRC != 0 the OGN's of the objects whose OGN's are equal to ISRC are
   set equal to IDST, and the number of them is returned to IRTN.  When
   ISRC = 0 and IDST != 0, the current OGN for the subsequent objects is set
   equal to IDST, and the current number of the stored objects is returned.
   When ISRC = IDST = 0, the current OGN is returned.  The storing mode must be
   set on to use this routine.

   ISRC  IDST : action                    : return value
  ------------+---------------------------+--------------------------
     +  !  0  : protects ISRC             : # of stored objs that got protected
     +  =  +  : nothing                   : # of stored objs with OGN = ISRC
     +  !  +  : changes OGN of stored objs: # of stored objs with OGN = IDST
     +  =  -  : hides ISRC                : # of objs that got hidden
     +  !  -  : hides ISRC as -IDST       : # of objs that got hidden
     -  !  0  : flushes & protects ISRC   : # of objs that got protected
     -  =  +  : flushes ISRC              : # of objs that got flushed
     -  !  +  : flushes ISRC & changes OGN: # of objs that got flushed
     -  =  -  : nothing                   : # of objs in the FB with OGN = ISRC
     -  !  -  : merge ISRC to IDST in FB  : # of objs that got merged
     0  =  0  : nothing                   : the current OGN
     0  ! +/- : changes the current OGN   : total # of the stored objs

   [ The symbol '=' or '!' between src and dst stands for whether src and dst
     are equal in their absolute values or not.]

Input
  ISRC != 0: sets OGN's of the existing objects with OGN = ISRC equal to IDST
        = 0: sets the current OGN equal to IDST (!= 0)
  IDST  = the OGN to be set

Output
   IRTN = the number of objects whose OGN's are equal to ISRC (if ISRC != 0)
        = the current number of the objects (if ISRC = 0 and IDST != 0)
        = the current OGN  (if ISRC = IDST = 0)
      < 0 failed
_______________________________________________________________________________
[TOC] [INDEX]

104. Anchor
*******************************************************************************
[F] SUBROUTINE GWANCHOR(IRTN, N)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: N

[C] int GWanchor(int N);
-------------------------------------------------------------------------------
Description
   Adds or removes anchors.  An anchor is an object that does nothing with the
   object group number 0.  Anchors are used to protect earlier objects from
   erasing with GWERASE or GWFRUSH.   On default, the anchor added with this
   function becomes the background anchor, which is associated with a
   background surface used in fast redrawings.   Each anchor is identified
   with the anchor number, the sequential number of the anchor in the anchors
   counted from the head of the objects.   When the storing mode is set off,
   the anchor is not an object but is used only to store a background surface.

Input
    N >  0: adds an anchor at the tail of the objects.  If the value of N is
            equal to the current number of the anchors, the last anchor is
            removed before adding.
      <  0: removes |N| anchors from the tail
      =  0: removes all anchors

Output
 IRTN >  0: the anchor number
      == 0: failed to add an anchor
      <  0: -(number of the anchors that could not been removed)
_______________________________________________________________________________
[TOC] [INDEX]

104. Set Background
*******************************************************************************
[F] SUBROUTINE GWSETBK(IRTN, N)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: N

[C] int GWsetbk(int N);
-------------------------------------------------------------------------------
Description
    Sets the anchor with the anchor number N (> 0) to be the background anchor.
    If N = 0, the background mode is turned off.  When N < 0 is specified,
    inquires the current anchor number or the number of the anchors.

Input
    N >  0: sets the anchor with the anchor number N to be the background
            anchor, or does nothing if no anchor of the specified anchor number
            exists.
      =  0: turns OFF the background mode
      = -1: inquires the current anchor number
      < -1: inquires the current total number of the anchors

Output
 IRTN >= 0: the current background anchor number (N >= -1) or
            the current number of the anchors (N < -1)
      <  0: error
_______________________________________________________________________________
[TOC] [INDEX]

104. Erase
*******************************************************************************
[F] SUBROUTINE GWERASE(IRTN, N, LRF)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: N, LRF

[C] int GWerase(int N, int LRF);
-------------------------------------------------------------------------------
Description
   Erases the objects with the abs(OGN) = N when N > 0.  When N = 0 the objects
   with non zero object group numbers are erased.  If a negative integer is
   given for N, the last abs(N) objects are erased.  The argument LRF is a flag
   for refreshing.   The current window is not refreshed immediately when
   LRF = 0 is specified, otherwise the graphic objects as instances of the
   objects deleted disappear from the current window.   The erasing is made from
   the tail of the objects, and is quitted if an object with OGN = 0 is reached.
   This routine works normally in case the storing mode is set on.

Input
    N > 0: erases the objects with the abs(OGN) = N
      = 0: erases the current window
      < 0: erases the last abs(N) objects
  LRF = flag for refreshing ( no refreshing when LRF = 0 )

Output
  IRTN = the number of the erased objects
_______________________________________________________________________________
[TOC] [INDEX]

104. Flushing
*******************************************************************************
[F] SUBROUTINE GWFLUSH(IRTN, N)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: N

[C] int GWflush(int N);
-------------------------------------------------------------------------------
Description
   Flushes suspended objects.   When N > 0 the objects with the OGN being equal
   to -N are flushed and the OGN's of them is inverted to be positive.
   When N < 0 the objects with the OGN being equal to -N are erased, and the
   objects with the OGN being equal to N are flushed with the sign inversions.
   When N = 0 all suspended objects with negative OGN are flushed with the
   sign inversions.  The number of the objects flushed is returned to IRTN.
   The storing mode must be set on to use this routine.

Input
     N > 0: flushes the objs with the OGN = -N
       < 0: erases the objs with the OGN = -N
            and flushes the objs with the OGN = N
       = 0: flushes all suspended objects

Output
  IRTN = the number of the objects flushed
_______________________________________________________________________________
[TOC] [INDEX]

105. Refresh
*******************************************************************************
[F] SUBROUTINE GWREFRESH(IRTN)
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWrefresh(void);
-------------------------------------------------------------------------------
Description
   Refreshs the current window ( = [View] -> [Redraw] at Menu Bar).  This
   routine works normally in case the storing mode is set on.

Input
   None

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

106. View Mode
*******************************************************************************
[F] SUBROUTINE GWVWMOD(IRTN, M)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: M

[C] int GWvwmod(int M);
-------------------------------------------------------------------------------
Description
   Sets or inquires the view mode of the current window, if any, or the default
   view mode, which is reffered in opening a windos (see GWopen).

Input
     M = 1: GWV_BITMAP        Bitmap
         2: GWV_ISOTROPIC     Isotropic
         3: GWV_FIT           Fit
         4: GWV_TOTAL         Total
         5: GWV_ZOOM          Zoom in (to the current view port, on setting)
 otherwise:                   inquire the view mode

Output
  IRTN = the view mode of the current window (see above, 0: if failed)
_______________________________________________________________________________
[TOC] [INDEX]

107. Setting and Inquiring Modes
*******************************************************************************
[F] SUBROUTINE GWMODE(IRTN, MD, M)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: MD, M

[C] int GWmode(int MD, int M);
-------------------------------------------------------------------------------
Description
   Sets or inquires a mode (see below).   The input parameters MD and M are for
   specifying a sort of mode and the mode to be set, respectively.

   1. Storing:  When this mode is set on, objects drawn are stored (serialized)
      in memory, and will be used in redrawing printing, and saving to a file,
      etc.   With this mode set off, on the contrary, they are deleted and the
      amount of memories used can be reduced, though features based on the
      serialization such as redrawing, printing and saving are not available,
      in principle.   The default status of this mode is set on.

   2. Buffering:  When status of this mode turned on an internal bitmap is
      created as a copy of the current window, and subsequent drawings are
      made on the bitmap.  The drawing on the bitmap is faster but is memory
      consuming.  The default status of this mode is set on.

   3. Displaying status bar:  For fast drawings it is recommended to set this
      mode off.  The default status of this mode is set on.

   4. Inquiring:  Shows dialog boxes in some aspects.  The default status of
      this mode is set off.

   5. Landscape:  The landscape mode is used in printing.  The default status
      of this mode is set on.

   6. Staying open on QUIT:  Leaves the main frame window open when GWQUIT
      is called.  The default status of this mode is set off.

   7. Embedding BMPs:  Embedes the bitmaps in a gwd file (see GWsaveas) when
      the gwd is specified as an output file format.  To extract bitmaps to
      *.bmp files this mode must set off.  The default status of this mode is
      set on.

Input
   MD = 1 :  storing mode
        2 :  buffering mode
        3 :  displaying status bar mode
        4 :  Inquiring
        5 :  Landscape
        6 :  Staying open on QUIT
        7 :  Embedding BMPs
   others :  not defined
    M = 0 :  sets off
      > 0 :  sets on
      < 0 :  inquires the current status

Output
 IRTN = 0 :  off
        1 :  on
       -1 :  error
_______________________________________________________________________________
[TOC] [INDEX]

108. Get Keyboard Status On Window
*******************************************************************************
[F] SUBROUTINE GWKYBRD(IRTN, ICH, NCNT, IFLG, M)
    INTEGER,INTENT(OUT) :: IRTN, ICH, NCNT, IFLG
    INTEGER,INTENT(IN) :: M

[C] int GWkybrd(int *ICH, int *NCNT, int *IFLG, int M);
-------------------------------------------------------------------------------
Description
   Gets the keyboard status on the associated window.  Depending on the value
   of the argument M specified when invoked, the control returns in different
   ways as seen in the following descriptions.   For each of ICH, NCNT and IFLG
   the value remains unchanged if no change was detected (IRTN = 0).

Input
     M = 0: returns immediately with the keyboard status
         1: after a keystroke, e.g. SHIFT+A, waits for the compretion of the
            translation to a nonsystem character (ASCII code).
         2: waits for a key down
         3: waits for a key up
 otherwise: if a key down was detected, waits for the key up and then returns
            with the keyboard status on invoked, otherwise returns immediately

Output
 IRTN = The virtual-key code (Windows) if the key is down, 0 otherwise.
  ICH = The key code for the last nonsystem key down.
 NCNT = Repeat count (the number of times the keystroke is repeated as a result
        of the user holding down the key).
 IFLG = Flags with meaningful bits listed as follows:

          0-7  Scan code (OEM-dependent value).
            8  Extended key, such as a function key or a key on the numeric keypad
               (1 if it is an extended key).
           13  Context code (1 if the ALT key is held down while the key is
               pressed; otherwise 0).
           14  Previous key state (1 if the key is down before the call, 0 if
               the key is up).
           15  Transition state (1 if the key is being released, 0 if the key
               is being pressed).
[TOC] [INDEX]

109. Get Mouse Status
*******************************************************************************
[F] SUBROUTINE GWMOUSE(IRTN, IRB, X, Y)
    REAL,INTENT(OUT) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN, IRB

[C] int GWmouse(int *IRB, float *X, float *Y);
-------------------------------------------------------------------------------
Description
   Gets the mouse status on the current window.

Input
   None

Output
 IRTN = The left button status. (0 when up)
  IRB = The right button status. (0 when up)
    X = X coordinate of the mouse pointer in World Coordinate System.
    Y = Y coordinate of the mouse pointer in World Coordinate System.
_______________________________________________________________________________
[TOC] [INDEX]

110. Interval Timer
*******************************************************************************
[F] SUBROUTINE GWTIMER(IRTN, MS, N)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: MS, N

[C] int GWtimer(int MS, int N);
-------------------------------------------------------------------------------
Description
   Starts the interval timer if N != 0 or stops it if N == 0.   The interval
   timer generates timer events, which can be detected by GWEVENT, at regular
   intervals specified with MS (milliseconds). If N > 0 the interval timer
   stops after generating N timer events.

Input
    MS  = the time interval between timer events (milliseconds)
     N  > 0: generates N timer events, and then stops the interval timer
        < 0: starts the interval timer
       == 0: stops the interval timer
Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

111. Get Event Status
*******************************************************************************
[F] SUBROUTINE GWEVENT(IRTN, X, Y)
    REAL,INTENT(OUT) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWevent(float *X, float *Y);
-------------------------------------------------------------------------------
Description
   Gets the event status on the current window.   The event status is set with
   the current mouse position when an event such that a key on the keyboard or
   on the mouse is down or the interval timer is expired is detected, and is
   kept until this routine is called.   The event status is reset by a call to
   this routine.

Input
   None

Output
 IRTN =  0: no event detected
      >  0: the virtual-key code (Windows) of the key down detected last
      = -1: the left mouse button down
      = -2: the right mouse button down
      = -3: interval timer expired (see GWTIMER)
    X = the world X coordinate of the mouse pointer.
    Y = the world Y coordinate of the mouse pointer.
_______________________________________________________________________________
[TOC] [INDEX]

112. Idling
*******************************************************************************
[F] SUBROUTINE GWIDLE(IRTN, ICH, X, Y, MSEC)
    REAL,INTENT(OUT) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN, ICH
    INTEGER,INTENT(IN) :: MSEC

[C] int GWidle(int *ICH, float *X, float *y, int MSEC);
-------------------------------------------------------------------------------
Description
   Leaves the status of the application in idling mode, during which the
   control is not returned and the execution of the application is suspended,
   until a keyboard input or a mouse button down is detected, or the specified
   time is elapsed.  In the idling mode the menu operations, e.g. Print, and
   moves of the mouse pointer by the cursor keys can be done. Pressing the
   combination of CTRL+SHIFT+X keys simultaneously the idring mode is canceled.

Input
   MSEC = the maximum elapsed time (milliseconds) for the idling.  If 0 or
          a negative value is specified, the maximum elapsed time is set as
          300000 (5 minutes).

Output
  IRTN  = the elapsed time (milliseconds)
  ICH > 0: the key code (ASCII) for the detected nonsystem key down
      = 0: the specified elapsed time expired
       -1: the left mouse button down was detected
       -2: the right mouse button down was detected
       -3: the middle mouse button down was detected
     -999: the idring mode was canceled
    X = the world x-coordinate of the mouse pointer
    Y = the world y-coordinate of the mouse pointer
[TOC] [INDEX]

113. Idling 2
*******************************************************************************
[F] SUBROUTINE GWIDLE2(IRTN, ICH, X, Y, MSEC)
    REAL,INTENT(OUT) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN, ICH
    INTEGER,INTENT(IN) :: MSEC

[C] int GWidle2(int *ICH, float *X, float *y, int MSEC);
-------------------------------------------------------------------------------
Description
   Is the same as GWIDLE except that the meaning of the input parameter MSEC
   is the time (milliseconds) measured by the internal clock (see GWSLEEP2) at
   which the idling is stopped if no event that causes the termination of the
   idling mode is detected, and the return value is not the elapsed time but
   the time of the internal clock.   The internal clock can be reset to be 0
   using GWSLEEP2.
[TOC] [INDEX]

114. Sleep
*******************************************************************************
[F] SUBROUTINE GWSLEEP(IRTN, MS)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: MS

[C] int GWsleep(int MS);
-------------------------------------------------------------------------------
Description
    Suspends execution for the specified time in milliseconds.

Input
   MS = the time, in milliseconds, for which to suspend execution.

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

115. Sleep 2
*******************************************************************************
[F] SUBROUTINE GWSLEEP2(IRTN, MS)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: MS

[C] int GWsleep2(int MS);
-------------------------------------------------------------------------------
Description
    Suspends execution until the specified wake-up time is up.  The time
    ( > 0, in milliseconds) is measured with the internal clock associated with
    the current window.  If a value MS <= 0 is specified, the time of the
    internal clock is set to be |MS| and the control is returned immediately.
    If the wake-up time specified with MS (> 0) is earlier than the current
    time, which can be obtained by GWCTIME, the control is returned immediately.
    On opening a window the time of the associated internal clock is reset to
    be 0.

Input
    MS > 0: the wake-up time (in milliseconds) at which the control is to be
            returned.
      <= 0: the time of the internal clock is initialized with the value |MS|

Output
  IRTN = the time (in milliseconds) of the internal clock at the invocation
_______________________________________________________________________________
[TOC] [INDEX]

116. Get Current time
*******************************************************************************
[F] SUBROUTINE GWCTIME(IRTN)
    INTEGER,INTENT(OUT) :: IRTN

[C] int GWctime(void);
-------------------------------------------------------------------------------
Description
    Gets the current time (in milliseconds) of the internal clock associated
    with the current window.

Input
    None

Output
  IRTN = the current time of the internal clock (in milliseconds)
_______________________________________________________________________________
[TOC] [INDEX]

117. Get Aspect Ratio
*******************************************************************************
[F] FUNCTION GWTICKS()
    REAL :: GWTICKS

[C] float GWtics();
-------------------------------------------------------------------------------
Description
   Retrieves the number of seconds as a float(REAL) that have elapsed since
   the system was started.

Input
   None

Output
  None

Return value
  The return value of the GetTickCount64() function[W] devided by 1000. The
  resolution of the GetTickCount64 function is limited to the resolution of
  the system timer, which is typically in the range of 10 milliseconds to 16
  milliseconds.
_______________________________________________________________________________
[TOC] [INDEX]

118. Pause
*******************************************************************************
[F] SUBROUTINE GWPAUSE(IRTN, TXT)
    INTEGER,INTENT(OUT) :: IRTN
    CHARACTER,INTENT(IN) :: TXT*(*)

[C] int GWpause(char *TXT, int l);
-------------------------------------------------------------------------------
Description
    Pops up a message box, and wait for a button selected.

Input
   TXT = string to be displayed in the message box

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

119. Get/Set Size
*******************************************************************************
[F] SUBROUTINE GWSIZE(IRTN, N, IW, IH)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER :: IW, IH
    INTEGER,INTENT(IN) :: N

[C] int GWsize(int N, int *IW, int *IH);
-------------------------------------------------------------------------------
Description
   Gets a size or a position if N > 0, or set a size or a position if N < 0.
   The item(s) marked with '*' cannot be set to change.  If IW = 0 or IH = 0 is
   specified in setting the current frame size (N = 3) the frame fits the view.
   Each position is the set of the relative coordinates of the top-left corner
   of the specified window measured from the top-left corner of its parent
   window.  Only the size of the display surface (N = 2) can be retrieved before
   the initialization of the library, say a call to GWOPEN or GWINIT.

Input
    N = 1:GWZ_PAPER      the current `paper' size (in pixels).
       *2:GWZ_SCREEN     the size of the display surface (in pixels).
        3:GWZ_FRAME      the current size of the frame (in pixels).
        4:GWZ_FRAMEP     the current position of the frame (in pixels) on the display.
        5:GWZ_VIEW       the current size of the view (in pixels).
        6:GWZ_VIEWP      the current position of the view (in pixels) in the parent frame.
        7:GWZ_VIEWPORT   the current view port size (in pixels).
        8:GWZ_VIEWPORTP  the current view port position (in pixels) in the parent view.
        9:GWZ_DFLTPSZ    the default `paper' size (in pixels).
       10:GWZ_DFLTDPI    the resolution assumed in saving as a bitmap file, etc. (in dpi).
       11:GWZ_PRNMRGN    the current margin in printing (in 0.1 mm).
      *12:GWZ_PRNTRES    the paper size for a working printer (in 0.1 mm), if any.
      *13:GWZ_PRNTDPI    the resolution (in dpi) for a working printer, if any.
     > 13:        L      not defined

Input (when N < 0)
    IW = Width
    IH = Height

Output (when N > 0)
    IW = Width
    IH = Height
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

120. Get Aspect Ratio
*******************************************************************************
[F] FUNCTION GWASPECT(N)
    REAL :: GWASPECT
    INTEGER,INTENT(IN) :: N

[C] float GWaspect(int N);
-------------------------------------------------------------------------------
Description
   Get aspect ratios defined as ratios of the width and the height of
   rectangles.  To draw a circle, not an ellipse, in [Bitmap] or [Isotropic]
   display mode draw an ellipse with a bounding rectangle with the ratio
   obtained by GWASPECT(-1) in the world coordinate system (WCS), for example.

Input
   N = sort of aspect ratio

Output
  None

Return value
  If N = 1:  the aspect ratio of the `paper' size (in pixels).
         2:  the aspect ratio of the current size of the view (in pixels).
         3:  the aspect ratio of the current size of the frame (in pixels).
         4:  the aspect ratio of the size of the display surface (in pixels).
         5:  the aspect ratio of the resolution (in dpi) of a working printer.
         6:  the aspect ratio of the paper size of a working printer (in pixels).
         7:  the aspect ratio of the current view port size (in pixels).
 otherwise:  the aspect ratio needed to draw a circle (in WCS).

 On error an error code ( <= 0 ) is returned.
_______________________________________________________________________________
[TOC] [INDEX]

121. Maximum value of Floating Point Numbers
*******************************************************************************
[F] FUNCTION GWFMAX()
    REAL :: GWFMAX

[C] float GWfmax(void);
-------------------------------------------------------------------------------
Description
   Returns the maximum floating point value.

Input
   None

Output
   None

Return value
   the maximum floating point value
_______________________________________________________________________________
[TOC] [INDEX]

122. Get Version Numbers
*******************************************************************************
[F] SUBROUTINE GWVERSION(IRTN,IS,STR)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IS
    CHARACTER,INTENT(OUT) :: STR*(*)

[C] int GWversion(int IS, char *STR, int l);
-------------------------------------------------------------------------------
Description
   Retrieve embedded strings, e.g. for the version number, in the library
   file.  This can be called befor the initialization of the library.

Input
   IS specifies the string to be retrieved
      = 0: Install Key
        1: the version numbers separated by commas, for each of which the
           larger it is the later the version is.
        2: the version number of the grwnd.exe compatible with the library.
        3: the creation date
        4: copyright
        5: build No.
     l = byte length of the string (character) variable STR

Output
 IRTN > 0; byte length of the string retrieved
      = 0; if the specified number for a string is invalid
      = - (byte length of the string to be retrieved) < 0; if failed
  STR = the retrieved string
_______________________________________________________________________________
[TOC] [INDEX]

123. Get Keyboard Status On Console
*******************************************************************************
[F] FUNCTION KBHIT()
    INTEGER :: KBHIT

[C] int kbhit(void);
-------------------------------------------------------------------------------
Description
   Get the keyboard status on the console window where the application started
   up.  The return value is 0 if no key is down (see GWKYBRD).

Input
   None

Output
   None

Return value
   keyboard status
_______________________________________________________________________________
[TOC] [INDEX]

124. Get a Key Code On Console
*******************************************************************************
[F] FUNCTION KBGETCH(N)
    INTEGER :: KBGETCH
    INTEGER,INTENT(IN) :: N

[C] int kbgetch(int N);
-------------------------------------------------------------------------------
Description
   Wait until a key is down and then get the key code on the console window
   where the application started up.   Internally getch() or getche() is
   called in this routine.

Input
   N  = 0: whithout echoing
     <> 0: whith echoing

Output
   None

Return value
   key code
_______________________________________________________________________________
[TOC] [INDEX]

125. Tortoise: Create
*******************************************************************************
[F] SUBROUTINE GWTSPAWN(IRTN, IT, IS, M)
    INTEGER IRTN, IT, IS, M

[C] int GWTspawn(int IT, int IS, int M);
-------------------------------------------------------------------------------
Description
   Creates a tortoise for Tortoise Graphics, a.k.a. Turtle Graphics.  A
   tortoise possesses a graphic object, which is one of a pen, a mark, a
   symbol, a bitmap or an EMF, to leave its trail as graphics and has the
   current position and the current direction as its attributes.  Any number
   of tortoises can be created and each tortoise is identified with a positive
   number, the tortoise number.  The tortoise number of a tortoise to be
   created can be specified with the input parameter IT.   If IT <= 0 is
   specified, an available number for the tortoise number is used.  If
   succeeded this returnes the tortoise number of the one created, otherwise
   returnes 0 if failed due to a tortoise that has the same tortoise number,
   for example.  The sort of the graphic object is specified by IS with M.  The
   initial position is set equal to the current position (see GWLINE2) and the
   initial direction to the right.  When the specified graphic object is not a
   bitmap nor an EMF, its logical color value is set equal to '(the tortoise
   number) mod 18 + 1' if none specified.  Other initial attributes of the
   graphic object are the same as those of the corresponding current object
   (see GWSETPEN, GWTSETMRK, GWTSETSYM).   As default a pen is used for the
   graphic object.

Input
   IT = a tortoise number of a tortoise to be created
   IS = sort of the graphic object (meaning of the input parameter M)
      = 1(GWT_PEN): pen (the logical color value)
      = 2(GWT_MRK): mark (the logical color value)
      = 3(GWT_SYM): symbol (the logical color value) --- not supported yet
      = 4(GWT_BMP): bitmap (the bitmap number) --- not supported yet
      = 5(GWT_EMF): EMF (the EMF number) --- not supported yet
    M = see IS above

Output
 IRTN = the number of the tortoise created ( > 0 ), 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

126. Tortoise: Turn
*******************************************************************************
[F] SUBROUTINE GWTTURN(IRTN, IT, DA)
    REAL,INTENT(IN) :: DA
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[F] SUBROUTINE GWDTTURN(IRTN, IT, DA)
    REAL(8),INTENT(IN) :: DA
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[C] int GWTturn(int IT, float DA);

[C] int GWDTturn(int IT, double DA);
-------------------------------------------------------------------------------
Description
   Turns a specified tortoise by changing the current forward direction by an
   amount DA.

Input
   IT = the tortoise number ( > 0 )
   DA = change in angle of the forward direction of the tortoise measured with
        respect to the x-axis in counterclockwise in the unit of deg/360.

Output
 IRTN = the number of the tortoise ( > 0 ), 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

127. Tortoise: Move Forward
*******************************************************************************
[F] SUBROUTINE GWTFORWARD(IRTN, IT, D)
    REAL,INTENT(IN) :: D
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[F] SUBROUTINE GWDTFORWARD(IRTN, IT, D)
    REAL(8),INTENT(IN) :: D
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[C] int GWTforward(int IT, float D);

[C] int GWDTforward(int IT, double D);
-------------------------------------------------------------------------------
Description
   Moves forward (D > 0) or backward (D < 0) the tortoise specified with |IT|
   from its current position by the distance |D|, and draws a line segment if
   IT > 0.   The world coordinates of the end point of the move is calculated
   as

     (x + D*cos(2*pi*A), y + D*sin(2*pi*A))

   where (x, y) is the current world position and A the angle of the forward
   direction (in deg/360) with pi = 3.14...   So it should be note that if the
   world coordinate system ( see GWINDOW ) is not set isotropic the actual
   angle of the line segment appeared on your display is different from that
   expected with the value of the current direction A.

Input
 |IT| = the tortoise number
  |D| = the world distance to the end point

Output
 IRTN = the number of the tortoise ( > 0 ), 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

128. Tortoise: Displace
*******************************************************************************
[F] SUBROUTINE GWTSHIFT(IRTN, IT, DX, DY)
    REAL,INTENT(IN) :: DX, DY
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[F] SUBROUTINE GWDTSHIFT(IRTN, IT, DX, DY)
    REAL(8),INTENT(IN) :: DX, DY
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[C] int GWTshift(int IT, float DX, float DY);

[C] int GWDTshift(int IT, double DX, double DY);
-------------------------------------------------------------------------------
Description
   Displaces the tortoise specified with |IT| from its current position by the
   displacement (DX, DY) given in the world coordinate system, and draws a line
   segment if IT > 0.

Input
   IT = the tortoise number ( > 0 )
   DX = the world x component of the displacement
   DY = the world y component of the displacement

Output
 IRTN = the number of the tortoise ( > 0 ), 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

129. Tortoise: Move To
*******************************************************************************
[F] SUBROUTINE GWTMOVE2(IRTN, IT, X, Y)
    REAL,INTENT(IN) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[F] SUBROUTINE GWDTMOVE2(IRTN, IT, X, Y)
    REAL(8),INTENT(IN) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[C] int GWTmove2(int IT, float X, float Y);

[C] int GWDTmove2(int IT, double X, double Y);
-------------------------------------------------------------------------------
Description
   Moves the tortoise specified with |IT| from its current position to the
   specified end point (X, Y) given in the world coordinate system, and draws a
   line segment if IT > 0.
Input
   IT = the tortoise number ( > 0 )
    X = the world x coordinate of the end point
    Y = the world x coordinate of the end point

Output
 IRTN = the number of the tortoise ( > 0 ), 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

130. Tortoise: Copy
*******************************************************************************
[F] SUBROUTINE GWTCLONE(IRTN, IT1, IT2)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT1, IT2

[C] int GWTclone(int IT1, int IT2);
-------------------------------------------------------------------------------
Description
   Copies a tortoise of the specified number IT1 > 0 to one with the tortoise
   number IT2 > 0.  If no tortoise with the specified number IT1 does not
   exists or one with IT2 exists, this routine failes and does nothing.  If
   IT2 == 0 is specified an available number is used as the destination
   tortoise number.

Input
   IT1 = the source tortoise number ( > 0 )
   IT2 = the destination tortoise number ( > 0 ) or 0

Output
 IRTN = the number of the tortoise created ( > 0 ), 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

131. Tortoise: Remove
*******************************************************************************
[F] SUBROUTINE GWTREMOVE(IRTN, IT)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[C] int GWTremove(int IT);
-------------------------------------------------------------------------------
Description
   Removes a tortoise of the specified number IT > 0.  If no tortoise with the
   specified number exists this routine does nothing.

Input
   IT = a tortoise number of a tortoise to be removed

Output
 IRTN = the number of the tortoise removed ( > 0 ), 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

132. Tortoise: Set Position
*******************************************************************************
[F] SUBROUTINE GWTSETPOS(IRTN, IT, X, Y)
    REAL,INTENT(IN) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[F] SUBROUTINE GWDTSETPOS(IRTN, IT, X, Y)
    REAL(8),INTENT(IN) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[C] int GWTsetpos(int IT, float X, float Y);

[C] int GWDTsetpos(int IT, double X, double Y);
-------------------------------------------------------------------------------
Description
   Sets the position of a specified tortoise without drawing.

Input
   IT = the tortoise number ( > 0 )
    X = the world x coordinate of the tortoise
    Y = the world x coordinate of the tortoise

Output
 IRTN = the number of the tortoise ( > 0 ), 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

133. Tortoise: Get Position
*******************************************************************************
[F] SUBROUTINE GWTGETPOS(IRTN, IT, X, Y)
    REAL,INTENT(OUT) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[F] SUBROUTINE GWDTGETPOS(IRTN, IT, X, Y)
    REAL(8),INTENT(OUT) :: X, Y
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[C] int GWTgetpos(int IT, float *X, float *Y);

[C] int GWDTgetpos(int IT, double *X, double *Y);
-------------------------------------------------------------------------------
Description
   Retrieves the current position in the world coordinate.

Input
   IT = the tortoise number ( > 0 )

Output
    X = the world x coordinate of the tortoise
    Y = the world x coordinate of the tortoise
 IRTN = the number of the tortoise ( > 0 ), 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

134. Tortoise: Set Direction
*******************************************************************************
[F] SUBROUTINE GWTSETDIR(IRTN, IT, A)
    REAL,INTENT(IN) :: A
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[F] SUBROUTINE GWDTSETDIR(IRTN, IT, A)
    REAL(8),INTENT(IN) :: A
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[C] int GWTsetdir(int IT, float A);

[C] int GWDTsetdir(int IT, double A);
-------------------------------------------------------------------------------
Description
   Sets the forward direction of a specified tortoise.

Input
   IT = the tortoise number ( > 0 )
    A = angle of the forward direction of the tortoise measured with respect to
        the x-axis in counterclockwise with the unit of deg/360.  This
        parameter is ignored if |A| >= 1.0.

Output
 IRTN = the number of the tortoise ( > 0 ), 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

135. Tortoise: Get Direction
*******************************************************************************
[F] SUBROUTINE GWTGETDIR(IRTN, IT, A)
    REAL,INTENT(OUT) :: A
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[F] SUBROUTINE GWDTGETDIR(IRTN, IT, A)
    REAL(8),INTENT(OUT) :: A
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT

[C] int GWTgetdir(int IT, float *A);

[C] int GWDTgetdir(int IT, double *A);
-------------------------------------------------------------------------------
Description
   Gets the forward direction of a specified tortoise.

Input
   IT = the tortoise number ( > 0 )

Output
    A = angle of the forward direction of the tortoise measured with respect to
        the x-axis in counterclockwise with the unit of deg/360.
 IRTN = the number of the tortoise ( > 0 ), 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

136. Tortoise: Set Color
*******************************************************************************
[F] SUBROUTINE GWTSETCOL(IRTN, IT, IPC)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT, IPC

[C] int GWTsetcol(int IT, int IPC);
-------------------------------------------------------------------------------
Description
   Sets the color of a specified tortoise.

Input
   IT = the tortoise number ( > 0 )
  IPC = the logical color value (see GWCOLOR)

Output
 IRTN = the number of the tortoise ( > 0 ), 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

137. Tortoise: Get Color
*******************************************************************************
[F] SUBROUTINE GWTGETCOL(IPC, IT)
    INTEGER,INTENT(OUT) :: IPC
    INTEGER,INTENT(IN) :: IT

[C] int GWTgetcol(int IT);
-------------------------------------------------------------------------------
Description
   Gets the color of a specified tortoise.

Input
   IT = the tortoise number ( > 0 )

Output
  IPC <> -1; the logical color value (see GWCOLOR)
       = -1; if failed
_______________________________________________________________________________
[TOC] [INDEX]

138. Tortoise: Set Pen Attributes
*******************************************************************************
[F] SUBROUTINE GWTSETPEN(IRTN, IT, IPC, IPS, IPW)
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT, IPC, IPS, IPW

[C] int GWTsetpen(int IT, int IPC, int IPS, int IPW);
-------------------------------------------------------------------------------
Description
   Sets the pen attributes of a specified tortoise.

Input
   IT = the tortoise number ( > 0 )
  IPC = the logical color value (see GWCOLOR)
  IPS = pen style (see GWCOLOR)
  IPW = pen width (see GWCOLOR)

Output
 IRTN = the number of the tortoise ( > 0 ), 0 if failed.
_______________________________________________________________________________
[TOC] [INDEX]

139. Tortoise: Set Mark Attributes
*******************************************************************************
[F] SUBROUTINE GWTSETMRK(IRTN, IT, MT, S, K, KS, KB, MX)
    REAL,INTENT(IN) :: S
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT, MT, K, KS, KB, MX

[F] SUBROUTINE GWDTSETMRK(IRTN, IT, MT, S, K, KS, KB, MX)
    REAL(8),INTENT(IN) :: S
    INTEGER,INTENT(OUT) :: IRTN
    INTEGER,INTENT(IN) :: IT, MT, K, KS, KB, MX

[C] int GWTsetmrk(int IT, int MT, float S, int K, int KS, int KB, int MX);

[C] int GWDTsetmrk(int IT, int MT, double S, int K, int KS, int KB, int MX);
-------------------------------------------------------------------------------
Description
   Sets the mark number MT, the size S in world coordinate, the logical mark
   color K for the pen, the logical mark color KS for the brush, the logical
   background mark color KB,  and the mix mode MX to the current mark.
   When MX > 15, the value (MX-16) is used as the "binary raster operation
   code [W]".  Negative numbers specified for parameters do not change
   corresponding attributes, except for K and KB (see GWCOLOR).   If MT = 0
   is specified, the parameter S is read a size of a dot, precisely a small
   solid rectangle, in pixels and so the size of any instance of such a dot
   is independent of the view mode, or not expanded even in 'Zoom in' mode,
   for example.

Input
   IT = the tortoise number ( > 0 )
   MT = 0: GWM_DOT          (dot)
        1: GWM_SOLIDSQUARE  (solid square)
        2: GWM_PLUS         (+)
        3: GWM_TIMES        (x)
        4: GWM_ASTERISK     (superposition of + and X)
        5: GWM_SQUARE       (filled square)
        6: GWM_CIRCLE       (filled circle)
   others: neglected
    S  = the size of a dot in pixels (MT = 0)
       = the height in the world coordinate > 0.0  (MT > 0)
    K != -1: the logical color value for the pen (see GWCOLOR)
       = -1: unchanged
   KS != -1: the logical color value for the brush (see GWCOLOR)
       = -1: unchanged
   KB != -1: the logical color value for the background (see GWCOLOR)
       = -1: unchanged
       = -100: transparent(default)
   MX = mix mode for the mark (see GWSETPEN)

Output
  IRTN = return code
_______________________________________________________________________________
[TOC] [INDEX]

140. Initialize (Calcomp compatible)
*******************************************************************************
[F] SUBROUTINE PLOTS(X, Y, LD)
    REAL,INTENT(IN) :: X, Y
    INTEGER,INTENT(IN) :: LD

[C] None
-------------------------------------------------------------------------------
Description
   Initialize the GrWin library, and then open a window.

      Implement using GrWin intrinsics:
            CALL GWOPEN(NW,0)

Input
    X = x coordinate of the initial pen position (in world coordinate system)
    Y = y coordinate of the initial pen position (in world coordinate system)
   LD = dummy for compatibility

Output
  None
_______________________________________________________________________________
[TOC] [INDEX]

141. Quit (Calcomp compatible)
*******************************************************************************
[F] SUBROUTINE PLOTE(MQ)
    INTEGER,INTENT(IN) :: MQ

[C] None
-------------------------------------------------------------------------------
Description
   Close all windows opened by the application, and do ending procedures.

      Implement using GrWin intrinsics:
            CALL GWQUIT

Input
   MQ = 0 :   Display a ending prompt '>' on the console window.
        1 :   Popup an ending dialog.
 otherwise:   without any prompting

Output
  None
_______________________________________________________________________________
[TOC] [INDEX]

142. Draw Line To/Move Pen (Calcomp compatible)
*******************************************************************************
[F] SUBROUTINE PLOT(X, Y, IP)
    REAL,INTENT(IN) :: X, Y
    INTEGER,INTENT(IN) :: IP

[C] None
-------------------------------------------------------------------------------
Description
    Move the pen to the point specified by (X, Y).

      Implement using GrWin intrinsics:
            CALL GWLINE2(X, Y)
      or
            CALL GWMOVE2(X, Y)

Input
    X = x coordinate of the destination point (in world coordinate system)
    Y = y coordinate of the destination point (in world coordinate system)
   IP = +/-2: Move with the pen down (draw a line)
        +/-3: Move with the pen up (do not draw)
        999: End of plot (PLOTE)
      <   0: The origin of the world coordinate is moved to the destination point.

Output
  None
_______________________________________________________________________________
[TOC] [INDEX]

143. Set World Coordinate System (Calcomp compatible)
*******************************************************************************
[F] SUBROUTINE WINDOW(XL, YT, XR, YB)
    REAL,INTENT(IN) :: XL, YT, XR, YB

[C] None
-------------------------------------------------------------------------------
Description
   Set the world coordinate system by giving the left, top, right and bottom
   coordinates of the view port in the required world coordinate system.
   It should be noted that the argument list is different from the corresponding
   GrWin intrinsic GWINDOW.

      Implement using GrWin intrinsics:
            CALL GWINDOW(XL, YB, XR, YT)

Input
    XL = x coordinate of the left position of the view port
    YT = y coordinate of the top of the view port
    XR = x coordinate of the right position of the view port
    YB = y coordinate of the bottom of the view port

Output
  None
_______________________________________________________________________________
[TOC] [INDEX]

144. New Pen (Calcomp compatible)
*******************************************************************************
[F] SUBROUTINE NEWPEN(IPC)
    INTEGER,INTENT(IN) :: IPC

[C] None
-------------------------------------------------------------------------------
Description
    Set the logical color value of the pen.

      Implement using GrWin intrinsics:
            GWSETPEN(IPC, -1, -1, -1)

Input
  IPC >= 0: Logical color value.
      = -1: unchanged
      < -1: Refer to GWCOLOR in this manual

Output
  None
_______________________________________________________________________________
[TOC] [INDEX]

145. Draw Character String (Calcomp compatible)
*******************************************************************************
[F] SUBROUTINE SYMBOL(X, Y, H, TXT, A, NC)
    REAL,INTENT(IN) :: X, Y, H, A
    CHARACTER,INTENT(IN) :: TXT*(*)
    INTEGER,INTENT(IN) :: NC

[C] None
-------------------------------------------------------------------------------
Description
    Draw a character string from the point (X, Y).

      Implement using GrWin intrinsics:
            CALL GWSETTXT(H, A, -1, -1, -1, ' ')
            CALL GWPUTTXT(X, Y, TXT)

Input
    X = the world x-coordinate of the bottom-left corner of the string
    Y = the world y-coordinate of the bottom-left corner of the string
    H > 0: height of the font
      = 0: use the default height for text fonts
      < 0: use the height of the current text font
  TXT = string to be drawn
    A = angle (in deg, counterclockwise)
   NC = number of characters to be drawn < 128.  If 0 or a negative number is
        specified all characters in TXT are drawn.

Output
  None
_______________________________________________________________________________
[TOC] [INDEX]

145. Draw Numeric Value (Calcomp compatible)
*******************************************************************************
[F] SUBROUTINE NUMBER(X, Y, H, D, A, ND)
    REAL,INTENT(IN) :: X, Y, H, D, A
    INTEGER,INTENT(IN) :: ND

[C] None
-------------------------------------------------------------------------------
Description
    Draw a numeric value as a string from the point (X, Y).   The parameter ND
    specifies decimal places.

      Implement using GrWin intrinsics:
            WRITE(TXT, *) N
            CALL GWSETTXT(H, A, -1, -1, -1, ' ')
            CALL GWPUTTXT(X, Y, TXT)

Input
    X = x coordinate of the bottom-left corner of the string
    Y = y coordinate of the bottom-left corner of the string
    H > 0: height
      = 0: use default height for text strings
      < 0: use current height for text strings
    D = a REAL to be drawn
    A = angle (in deg, counterclockwise)
   ND >  0: decimal places
      =  0: no decimal place with a decimal point
      = -1: truncate into an integer
      < -1: upper |ND| digits in integer part

Output
  None
_______________________________________________________________________________
[TOC] [INDEX]

146. Erase Window (Calcomp compatible)
*******************************************************************************
[F] SUBROUTINE GCLS(IDMY)
    INTEGER,INTENT(IN) :: IDMY

[C] None
-------------------------------------------------------------------------------
Description
   Erase the current window.

Input
   IDMY = dummy for compatibility

Output
  None
_______________________________________________________________________________
[TOC] [INDEX]


Index

Function Fortran C #
Anchorgwanchor GWanchor 106.
Arrange Windowsgwarrange GWarrange 20.
Begin Making an EMFgwbeginemf GWbeginemf 94.
Capture Imagegwcapimg GWcapimg 89.
Capture Linegwcaplin GWcaplin 76.
Capture Pointgwcappnt GWcappnt 74.
Capture Rectanglegwcaprect GWcaprect 77.
Capture Vectorgwcapvec GWcapvec 75.
Clear Windowgwclear GWclear 52.
Close Windowgwclose GWclose 7.
Copy Registered Bitmapgwcopybmp GWcopybmp 87.
Copy Registered EMFgwcopyemf GWcopyemf 98.
Copy To Clipboardgwclipimg GWclipimg 90.
Create Custom Palettegwpalette GWpalette 72.
Create Mark as EMFgwemfmrk GWemfmrk 93.
Delete Bitmapgwdelbmp GWdelbmp 88.
Delete EMFgwdelemf GWdelemf 99.
Draw Arcgwarc GWarc 44.
Draw Beziergwbezier GWbezier 50.
Draw Bitmapgwputbmp GWputbmp 86.
Draw Character String (Calcomp compatible)symbol None 150.
Draw Closed Arcgwchord GWchord 45.
Draw EMFgwputemf GWputemf 96.
Draw Ellipsegwellipse GWellipse 43.
Draw Line Segmentsgwpolylin GWpolylin 49.
Draw Line To/Move Pen (Calcomp compatible)plot None 147.
Draw Line Togwline2 GWline2 38.
Draw Linegwline GWline 39.
Draw Markgwputmrk GWputmrk 54.
Draw Numeric Value (Calcomp compatible)number None 151.
Draw Piegwpie GWpie 46.
Draw Polygongwpolygon GWpolygon 48.
Draw Rectangle Filled with Solid Colorgwsrect GWsrect 41.
Draw Rectanglegwrect GWrect 40.
Draw Round Rectanglegwrrect GWrrect 42.
Draw Symbolgwputsym GWputsym 33.
Draw Text Stringgwputtxt GWputtxt 30.
End Making an EMFgwendemf GWendemf 95.
Erase Window (Calcomp compatible)gcls None 152.
Erasegwerase GWerase 108.
Fill Bounded Areagwflood GWflood 51.
Flushinggwflush GWflush 109.
Get Aspect Ratiogwaspect* GWaspect 125.
Get Aspect Ratiogwticks* GWtics 122.
Get Attributes of EMFgwgetemf GWgetemf 97.
Get Bitmap Attributesgwgetbmp GWgetbmp 85.
Get Brush Attributesgwgetbrs GWgetbrs 27.
Get COLORREF valueigwcolor* GWgetcolor 67.
Get COLORREF valuekcolor* GWkcolor 66.
Get Current timegwctime GWctime 121.
Get Event Statusgwevent GWevent 116.
Get Keyboard Status On Consolekbhit* kbhit 128.
Get Keyboard Status On Windowgwkybrd GWkybrd 113.
Get Mark Attributesgwgetmrk GWgetmrk 55.
Get Max Index of the Palettegwncolor GWncolor 68.
Get Mouse Statusgwmouse GWmouse 114.
Get Pen Attributesgwgetpen GWgetpen 25.
Get Pixelgwgetpxl GWgetpxl 62.
Get Position in LDCSgwldcpos GWldcpos 21.
Get RGBgwgetrgb GWgetrgb 64.
Get Sise in LDCSgwldcsiz GWldcsiz 22.
Get Symbol Extentgwgetsym GWgetsym 32.
Get System Colorgwsysclr GWsysclr 71.
Get Text Extentgwgettxt GWgettxt 29.
Get Transformation Matrixgwgetxfrm GWgetxfrm 59.
Get Version Numbersgwversion GWversion 127.
Get View Portgwgetvp GWgetvp 12.
Get Window / Firstgwfirst GWfirst 15.
Get Window / Nextgwnext GWnext 16.
Get World Coordinate Systemgwgetwn GWgetwn 9.
Get a Key Code On Consolekbgetch* kbgetch 129.
Get/Set Sizegwsize GWsize 124.
Idling 2gwidle2 GWidle2 118.
Idlinggwidle GWidle 117.
Initialize (Calcomp compatible)plots None 145.
Initializegwinit GWinit 1.
Initializegwinitx GWinitx 1.
Input Stringgwinput GWinput 100.
Interval Timergwtimer GWtimer 115.
Join in a Windowgwjoin GWjoin 5.
Leavegwleave GWleave 4.
Load Bitmapgwloadbmp GWloadbmp 78.
Load Custom Colorgwloadcc GWloadcc 70.
Load Datagwload GWload 102.
Load Metafilegwloademf GWloademf 91.
Make Bitmap from Fontgwfnt2bmp GWfnt2bmp 83.
Make Bitmapgwmakebmp GWmakebmp 80.
Maximum value of Floating Point Numbersgwfmax* GWfmax 126.
Message Boxmsgbox* GWmsgbox 35.
Move Pengwmove2 GWmove2 37.
New Pen (Calcomp compatible)newpen None 149.
Offset Custom Palettegwpoffset GWpoffsetl 73.
Open Windowgwopen GWopen 2.
Open Windowgwopenx GWopenx 2.
Pausegwpause GWpause 123.
Peek Bitmap Datagwpeekbmp GWpeekbmp 81.
Pen Positiongwgetpos GWgetpos 36.
Plot 1D Array Elementsgwplot1 GWplot1 47.
Poke Bitmap Datagwpokebmp GWpokebmp 82.
Popup File Dialoggwfiledlg GWfiledlg 101.
Printgwprint GWprint 104.
Quit (Calcomp compatible)plote None 146.
Quitgwquit GWquit 3.
Quitgwquitx GWquitx 3.
Refreshgwrefresh GWrefresh 110.
Reset Parametersgwreset GWreset 6.
Retrieve Pixel Sise in WCSgwpxlsiz GWpxlsiz 23.
Save Bitmapgwsavebmp GWsavebmp 79.
Save Custom Colorgwsavecc GWsavecc 69.
Save Datagwsaveas GWsaveas 103.
Save EMF as Filegwsaveemf GWsaveemf 92.
Save View Port Infogwsavevp GWsavevp 13.
Select View Portgwselvp GWselvp 14.
Select Windowgwselect GWselect 17.
Set Attributes of Mark Brushgwmrkbrs GWmrkbrs 57.
Set Attributes of Mark Pengwmrkpen GWmrkpen 56.
Set Backgroundgwsetbk GWsetbk 107.
Set Bitmap Attributesgwsetbmp GWsetbmp 84.
Set Brush Attributesgwsetbrs GWsetbrs 26.
Set Clipping Regiongwsetrgn GWsetrgn 60.
Set Colorgwcolor GWcolor 63.
Set Frame's Show Stategwshowfr GWshowfr 19.
Set Mark Attributesgwsetmrk GWsetmrk 53.
Set Object-Group Numbergwsetogn GWsetogn 105.
Set Pen Attributesgwsetpen GWsetpen 24.
Set Pixelgwsetpxl GWsetpxl 61.
Set RGBkrgb* GWkrgb 65.
Set Symbol Font Attributesgwsetsym GWsetsym 31.
Set Text Font Attributesgwsettxt GWsettxt 28.
Set Transformation Matrixgwsetxfrm GWsetxfrm 58.
Set View Port (in the world coordinate)gwport GWport 11.
Set View Portgwvport GWvport 10.
Set Window's Show Stategwshowwn GWshowwn 18.
Set World Coordinate System (Calcomp compatible)window None 148.
Set World Coordinate Systemgwindow GWindow 8.
Setting and Inquiring Modesgwmode GWmode 112.
Sleep 2gwsleep2 GWsleep2 120.
Sleepgwsleep GWsleep 119.
Status Bargwsetmsg GWsetmsg 34.
Tortoise: Copygwtclone GWTclone 135.
Tortoise: Creategwtspawn GWTspawn 130.
Tortoise: Displacegwdtshift GWDTshift 133.
Tortoise: Displacegwdtshift GWTshift 133.
Tortoise: Get Colorgwtgetcol GWTgetcol 142.
Tortoise: Get Directiongwdtgetdir GWDTgetdir 140.
Tortoise: Get Directiongwdtgetdir GWTgetdir 140.
Tortoise: Get Positiongwdtgetpos GWDTgetpos 138.
Tortoise: Get Positiongwdtgetpos GWTgetpos 138.
Tortoise: Move Forwardgwdtforward GWDTforward 132.
Tortoise: Move Forwardgwdtforward GWTforward 132.
Tortoise: Move Togwdtmove2 GWDTmove2 134.
Tortoise: Move Togwdtmove2 GWTmove2 134.
Tortoise: Removegwtremove GWTremove 136.
Tortoise: Set Colorgwtsetcol GWTsetcol 141.
Tortoise: Set Directiongwdtsetdir GWDTsetdir 139.
Tortoise: Set Directiongwdtsetdir GWTsetdir 139.
Tortoise: Set Mark Attributesgwdtsetmrk GWDTsetmrk 144.
Tortoise: Set Mark Attributesgwdtsetmrk GWTsetmrk 144.
Tortoise: Set Pen Attributesgwtsetpen GWTsetpen 143.
Tortoise: Set Positiongwdtsetpos GWDTsetpos 137.
Tortoise: Set Positiongwdtsetpos GWTsetpos 137.
Tortoise: Turngwdtturn GWDTturn 131.
Tortoise: Turngwdtturn GWTturn 131.
View Modegwvwmod GWvwmod 111.

Created: Sun Jul 31 6:17:51 JST 2022