home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GP
-
- Revision 5/17/94
-
-
- A graphics package for Turbo Pascal
-
-
-
-
-
-
-
- H. J. MACKEY
-
- UNT PHYSICS
- P. O. BOX 5368
- NT STATION
- DENTON, TEXAS 76203
-
- (817) 565-3266
- MACKEY@GAB.UNT.EDU
- 74363.1553@CompuServe.Com
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- UNIT GP;
-
- INTERFACE
-
- USES Graph, BGIDrvr, BGIFont, Crt, Printer, GraphPrn, HpCopy, Powers, Mouse;
-
- CONST { included for reference and so that GRAPH not necessarily needed }
-
- { EGA VGA COLORS DRIVERS MODES FOR DRIVERS }
- Black = 0; Detect = 0; CGAc0 = 0; CGAc1 = 1; CGAc2 = 2;
- Blue = 1; CGA = 1; CGAc3 = 3; CGAhi = 4;
- Green = 2;
- Cyan = 3; EGA = 3; EGALo = 0; EGAhi = 1;
- Red = 4; EGA64 = 4; EGA64Lo = 0; EGA64hi = 1;
- Magenta = 5;
- Brown = 6;
- LightGray = 7; HercMono = 7; HercMonoHi = 0;
- DarkGray = 8;
- LightBlue = 9; VGA = 9; VGALo = 0; VGAmed = 1; VGAhi = 2;
- LightGreen = 10;
- LightCyan = 11; { SEE Ref Guide GRAPH UNIT def's }
- LightRed = 12;
- LightMagenta = 13; {>>>> HERC, CGA, EGAVGA drivers are linked into }
- Yellow = 14; {>>>> *.EXE along with SmallFont driver }
- White = 15; {>>>> USE unit VESA16U.TPU if wish to use VESA16 }
-
- VAR { GLOBALS FOR POSSIBLE USE BY MAIN }
-
- { graph driver and graph mode variables }
- Gdrvr, Gmode : INTEGER;
-
- { current world values }
- WorldXmin, WorldXmax, WorldYmin, WorldYmax : REAL;
-
- { current window values }
- WindowXmin, WindowXmax, WindowYmin, WindowYmax : INTEGER;
-
- { values labeled at ends of axes created by MakeWorldAndAxes }
- AxesXmin, AxesXmax, AxesYmin, AxesYmax : REAL;
-
- PROCEDURE BeginGraphic(VAR Gdrvr, Gmode : INTEGER);
- PROCEDURE EndGraphic;
-
- PROCEDURE GoGraphic;
- PROCEDURE GoText;
-
- PROCEDURE DefineWorld(Num : INTEGER; Xmin, Xmax, Ymin, Ymax : REAL);
- PROCEDURE SelectWorld(Num : INTEGER);
- PROCEDURE BoxWorld(Color : WORD);
-
- PROCEDURE DefineWindow(Num : INTEGER; Xmin, Xmax, Ymin, Ymax : REAL);
- PROCEDURE SelectWindow(Num : INTEGER);
- PROCEDURE ClearCurrentWindow;
-
- PROCEDURE MakeWorldAndAxes(WindowNum,WorldNum:INTEGER;
- Xmin, Xmax, Ymin, Ymax : REAL; AxesColor, BoxColor : WORD;
- Xtitle : STRING; XtitleColor : WORD;
- Ytitle : STRING; YtitleColor : WORD;
- MainTitle : STRING; MainTitleColor : WORD);
-
- FUNCTION XperPixel : REAL;
- FUNCTION YperPixel : REAL;
- FUNCTION NowX : REAL;
- FUNCTION NowY : REAL;
- PROCEDURE GetXYfromPixels(VAR X,Y : REAL; Xpos, Ypos : INTEGER);
- FUNCTION XtoYAspFac : REAL;
-
- PROCEDURE PlotPoint(X, Y : REAL; Color : WORD);
- FUNCTION GetPoint(X, Y : REAL) : WORD;
-
- PROCEDURE PlotTextXY(X, Y : REAL; TextString : STRING; Color : WORD);
- PROCEDURE PlotText(TextString : STRING; Color : WORD);
-
- PROCEDURE PlotRealXY(LabelStr : STRING;
- Value : REAL;W, d : INTEGER;X,Y : REAL;Color : WORD);
- { for X:w format type use d = -1 }
- PROCEDURE PlotReal(LabelStr : STRING;
- Value : REAL;W, d : INTEGER; Color : WORD);
- { for X:w format type use d = -1 }
-
- PROCEDURE PlotIntegerXY(LabelStr : STRING; Value, w : INTEGER;
- X, Y : REAL; Color : WORD);
-
- PROCEDURE PlotInteger(LabelStr : STRING; Value, w : INTEGER; Color : WORD);
-
- PROCEDURE PlotLine(X1, Y1, X2, Y2 : REAL; Color : WORD);
- PROCEDURE PlotLineTo(X,Y : REAL; Color : WORD);
- PROCEDURE PlotLineRel(Dx,Dy : REAL; Color : WORD);
-
- PROCEDURE PlotMoveTo(X,Y : REAL);
- PROCEDURE PlotMoveRel(Dx, Dy : REAL);
-
- PROCEDURE PlotEllipse(Xmin, Xmax, Ymin, Ymax : REAL; Color : WORD);
- PROCEDURE PlotRect(Xmin, Xmax, Ymin, Ymax : REAL; Color : WORD);
- PROCEDURE PlotCircle(X, Y, R : REAL; Color : WORD);
- PROCEDURE Flood(x,y :REAL; FillColor,BorderColor : WORD);
-
- PROCEDURE SaveImage(Num:INTEGER; Xmin,Xmax,Ymin,Ymax: REAL);
- PROCEDURE UnSaveImage(Num : INTEGER);
- PROCEDURE ClearImage(Num:INTEGER);
- PROCEDURE PlotImage(Num:INTEGER; Xlow,Yhi : REAL; PutType : WORD);
- PROCEDURE MoveImage(Num:INTEGER; Xlow, Yhi : REAL);
- PROCEDURE HeapImageToDisk(ImageNum : INTEGER; FileName : STRING);
- PROCEDURE DiskImageToHeap(FileName : STRING; ImageNum : INTEGER);
-
- PROCEDURE CrossCursor(VAR CursorX, CursorY : REAL;
- ColorCursor:WORD;ShowXY:Boolean;
- Col, Row : INTEGER; ColorText : WORD);
- PROCEDURE BoxCursor(VAR BoxXmin, BoxXmax, BoxYmin, BoxYmax : REAL;
- ColorCursor : WORD; ShowXY : BOOLEAN;
- Col, Row : INTEGER; ColorText : WORD);
- PROCEDURE GetPixelArea(CurveColor, RefillColor : Word; VAR Area : REAL);
-
- FUNCTION MouseOK : BOOLEAN;
- PROCEDURE RestrictMouseToWindow;
- PROCEDURE GetMouseXY(VAR X,Y:REAL);
- FUNCTION LeftMouseXY(VAR X, Y :REAL): BOOLEAN;
- FUNCTION LeftButtonClicked(VAR X, Y : REAL) : BOOLEAN;
- FUNCTION RightMouseXY(VAR X, Y :REAL): BOOLEAN;
- FUNCTION RightButtonClicked(VAR X, Y : REAL) : BOOLEAN;
- PROCEDURE MousePointer(VAR X, Y : REAL; Show : BOOLEAN;
- Row, Col : INTEGER; Color : BYTE);
- PROCEDURE MouseRubberBox(VAR X1,X2,Y1,Y2:REAL;Color : Word;
- EraseBox : BOOLEAN);
- PROCEDURE MouseRubberLine(VAR X1, Y1, X2, Y2 : REAL; Color : WORD;
- EraseLine : Boolean);
- PROCEDURE MouseDraw(Color : WORD);
-
- PROCEDURE CopyToEpson;
- PROCEDURE CopyToHPLaserJet;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GP.TPU is a real number based graphics unit for Turbo Pascal which
-
- utilizes many of the pixel based procedures in the standard GRAPH.TPU unit in
-
- a manner transparent to the user. The user is completely freed from pixel
-
- counting, and he is allowed to think in terms of real numbers appropriate to
-
- the results of computation.
-
-
- HERCULES, CGA, and EGAVGA drivers are linked, along with that for
-
- SmallFont. This allows the final EXE file to contain these drivers.
-
- The unit supplies 47 procedures and 11 functions organized into 17 groups.
-
- The preceeding printout of the UNIT INTERFACE section shows the formal
-
- parameter list for each procedure or function along with the GLOBAL VAR and
-
- GLOBAL CONST's that are provided. These will now be described individually.
-
- ------------------------------------------------------------------------------
-
- Procedure BeginGraphic:
-
- This is the FIRST procedure called. It places the video into graphics
-
- mode, and loads the graphics system into memory. All other procedures may now
-
- be used. The GLOBAL VAR Gdrvr is the name of the graphics driver to be used.
-
- The GLOBAL VAR Gmode is the mode selected for that driver. See the GLOBAL
-
- CONST list for some of the allowed parameters. See the USER'S MANUAL for
-
- other choices. If the line Gdrvr := Detect; is used, the system will
-
- automatically determine the graphics card in use and set Gmode to the most
-
- dense mode available. IN ALL OTHER CASES Gmode MUST BE ASSIGNED before
-
- BeginGraphic is executed. Gdrvr is initialized to Gdrvr := Detect.
-
- ------------------------------------------------------------------------------
-
- Procedure EndGraphic:
-
- This is the LAST procedure called. It causes the graphics system to be
-
- unloaded from memory, and puts the video into standard text mode. Generally,
-
- all other procedures are bracketed between BeginGraphic and EndGraphic.
-
- ------------------------------------------------------------------------------
-
-
-
-
- Procedures GoGraphic and GoText:
-
- These procedures allow switching back and forth between graphics mode and
-
- text mode WITHOUT unloading the graphics system from memory. After using
-
- GoGraphic, the full screen is made the current window.
-
- ------------------------------------------------------------------------------
-
- Procedure DefineWorld:
-
- The user may define up to 10 "worlds". These are merely statements of the
-
- range of real numbers horizontally LEFT to RIGHT and vertically BOTTOM to TOP
-
- which map to a window on the screen.
-
- Num : integer 1 .. 10 index to assign to this world.
- Xmin : real number to associate with LEFT side of window.
- Xmax : real number to associate with RIGHT side of window.
- Ymin : real number to associate with BOTTOM of window.
- Ymax : real number to associate with TOP of window.
-
- ------------------------------------------------------------------------------
-
- Procedure SelectWorld:
-
- Any world which has been defined may be selected as the current world.
-
- Only one world is the current world at any instant. All 10 available worlds
-
- are initialized by BeginGraphic to the values Xmin = -10.0, Xmax = 10.0,
-
- Ymin = -10.0, Ymax = 10.0, and this common world is made the current world.
-
- The real GLOBAL variables WorldXmin, WorldXmax, WorldYmin, and WorldYmax are
-
- set to the values which define the world.
-
- ------------------------------------------------------------------------------
-
- Procedure BoxWorld:
-
- Causes a rectangle to be drawn at the boundaries of the current window
-
- in the color specified.
-
- ------------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
- Procedure DefineWindow:
-
- The user may define up to 10 graphic windows or regions on the screen.
-
- The screen is imagined ruled from 0.0 to 100.0 % from LEFT (0) to RIGHT (100),
-
- and fron BOTTOM (0) to TOP (100). The parameter list supplies the window
-
- number or index, and describes its location and size by giving the REALs
-
- Xmin, Xmax, Ymin, and Ymax. An example of a window defined as window number 3,
-
- which occupies the center ninth of the screen is :
-
- DefineWindow(3,33.3,66.6,33.3,66.6);
-
- ------------------------------------------------------------------------------
-
- Procedure SelectWindow:
-
- This procedure makes window number "Num" the current window. Only one
-
- window may be the active current window at any instant. BeginGraphic
-
- initializes all 10 available windows to the entire screen and selects this
-
- common window to be the current window. Note that any defined world may be
-
- selected independent of the index of the current window. All drawing takes
-
- place in the current window and is visible if the points or lines are
-
- described by numeric values falling within the boundaries of the current
-
- world. Drawings are clipped at the edges of the window and no error takes
-
- place if points are "drawn" outside the window. They are just not visible.
-
- The INTEGER globals WindowXmin, WindowXmax, WindowYmin and WindowYmax are
-
- given values. These are full screen pixel counts across and DOWN from the
-
- upper left corner of the screen. These are the ONLY values of this type
-
- which count Y position from TOP to BOTTOM.
-
- ------------------------------------------------------------------------------
-
- Procedure ClearCurrentWindow:
-
- This procedure erases the current window to the default background color
-
- black unless changed by procedure SetBkColor(Color) in the GRAPH unit.
-
- ------------------------------------------------------------------------------
-
-
-
-
-
- Procedure MakeWorldAndAxes:
-
- This procedure is provided to draw axes. It will CREAT a world which is
-
- appropriate for the range in X and Y described by Xmin, Xmax, Ymin, Ymax and
-
- will assign this world the index WorldNum (1 .. 10). This world is then made
-
- the current world. The previously defined window of index WindowNum is
-
- selected as the current window. Fully annotated axes are then drawn along
-
- with titles. The size of the annotations is varied dependent upon the size
-
- of the window. Window(WindowNum) is then REDEFINED to correspond to the
-
- drawing area, and World(WorldNum) is redefined to correspond to the values of
-
- the real GLOBALs AxesXmin, AxesXmax, AxesYmin and AxesYmax which label the
-
- extremes of the axes.
-
- ------------------------------------------------------------------------------
-
- Functions XperPixel and YperPixel:
-
- The function XperPixel returns the real positive number which is the
-
- the change in X which represents a one pixel horizontal displacement for the
-
- current window and world. YperPixel returns similar information for a one
-
- pixel vertical displacement.
-
- ------------------------------------------------------------------------------
-
- Functions NowX and NowY:
-
- These functions return the real number X and Y coordinates of the
-
- invisible graphics cursor.
-
- ------------------------------------------------------------------------------
-
- Procedure GetXYfromPixels:
-
- This procedure returns the real values X, Y corresponding to the pixel
-
- integer coordinates Xpos, Ypos. Note that Xpos and Ypos are viewport relative.
-
- ------------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
- Function XtoYAspFac:
-
- This function returns the factor required in order to draw square
-
- rectangles and circular ellipses on the screen. This factor depends upon
-
- the graphics driver, graphics mode, current window and current world. If a
-
- horizontal line is drawn between (X1, Y1) and (X2, Y1), then a vertical
-
- line drawn from (X1,Y1) to (X1,Y2) will appear of the same length if
-
- Y2 - Y1 = (X2 - X1)* XtoYAspFac.
-
- Also, consider :
-
- PlotLine(0.0,0.0,R*Cos(Theta)/XtoYAspFac,R*Sin(Theta),Green);
-
- This will draw a line whose length on screen is independent of the angle
-
- Theta, and is independent of the window and world in use.
-
- ------------------------------------------------------------------------------
-
- Procedure PlotPoint:
-
- This procedure is used to plot a point in the current window at
-
- coordinates X, Y in the current world. The color may be set for EGA, VGA
-
- as indicated in the interface listing. NOTE : the invisible graphics cursor
-
- is NOT moved to the point drawn by this procedure.
-
- ------------------------------------------------------------------------------
-
- Function GetPoint:
-
- This function returns the color of the pixel at world coordinates X, Y.
-
- ------------------------------------------------------------------------------
-
- Procedure PlotTextXY:
-
- Text is drawn in default font, direction and justification unless defaults
-
- are modified by GRAPH procedures SetTextStyle, SetTextJustify. Text is drawn
-
- at world coordinates X and Y in the current window, using the specified
-
- color. NOTE : the invisible graphics cursor is NOT updated by this procedure.
-
- ------------------------------------------------------------------------------
-
- Procedure PlotText:
-
- As PlotTextXY except the text is plotted at the current position of the
-
- invisible graphics cursor. The graphics cursor IS updated if horizontal
-
- direction and justification are set (default conditions).
-
- ------------------------------------------------------------------------------
-
-
-
-
-
- Procedure PlotRealXY:
-
- The real number, preceeded by the label string, is drawn in the selected
-
- color at the world coordinates X and Y. The format Value:w:d is selected
-
- by the values of w and d. To use format type Value:w, set d = -1.
-
- The graphics cursor IS updated if horizontal direction and justification
-
- are set (default conditions).
-
- -----------------------------------------------------------------------------
-
- Procedure PlotReal:
-
- As PlotRealXY except that the string is plotted at the current position
-
- of the graphics cursor. The graphics cursor IS updated if horizontal direction
-
- and justification are set (default conditions).
-
- -----------------------------------------------------------------------------
-
- Procedure PlotIntegerXY:
-
- An integer value, preceeded by the label string, is drawn in the selected
-
- color at world coordinates X and Y. The width of the field occupied by the
-
- integer is specified by "w". The graphics cursor IS updated if horizontal
-
- direction and justification are set (default conditions).
-
- ------------------------------------------------------------------------------
-
- Procedure PlotInteger:
-
- As procedure PlotIntegerXY except string is plotted at the current
-
- position of the graphics cursor. The graphics cursor IS updated if horizontal
-
- direction and justification are set (default conditions).
-
- ------------------------------------------------------------------------------
-
- Procedure PlotLine:
-
- A line is drawn in color specified and default style to connect the two
-
- points whose world coordinates are specified. See GRAPH procedure SetLineStyle
-
- SetWriteMode for optional appearance. NOTE : the invisible graphics cursor is
-
- NOT updated by this procedure.
-
- ------------------------------------------------------------------------------
-
- Procedure PlotLineTo:
-
- A line is drawn in specified color and default style from the current
-
- graphics cursor position to that corresponding to the specified world
-
- coordinates X and Y. NOTE : the invisible graphics cursor IS updated by this
-
- procedure.
-
- ------------------------------------------------------------------------------
-
- Procedure PlotLineRel:
-
- A line is drawn from the current invisible graphics cursor position (X, Y)
-
- to a point (X + Dx, Y + Dy) in the current window using the current world.
-
- NOTE: the graphics cursor IS updated by this procedure.
-
- ------------------------------------------------------------------------------
-
- Procedure PlotMoveTo:
-
- Positions the invisible graphics cursor at the specified position using
-
- the current world and current window.
-
- ------------------------------------------------------------------------------
-
- Procedure PlotMoveRel:
-
- Moves the invisible graphics cursor from its present position (X, Y) to
-
- a new point (X + Dx, Y + Dy) in the current window using the current world.
-
- ------------------------------------------------------------------------------
-
- Procedure PlotEllipse:
-
- Draws an ellipse inscribed in an imaginary rectangle whose sides are
-
- specified. Note that because the aspect ratio between horizontal and vertical
-
- displacements is unlikely to be one, the world in use may be adjusted so that
-
- if the rectangle is square, that the ellipse appears as a circle. For
-
- example DefineWorld(1,Ymin*XtoYaspFac,Ymax*XtoYaspFac,Ymin,Ymax). See
-
- Function XtoYAspFac above for more discussion of aspect ratio.
-
- NOTE: the invisible graphics cursor is left at the center of the rectangle.
-
- ------------------------------------------------------------------------------
- Procedure PlotRect:
-
- Draws a rectangle whose sides are specified in designated color. See
-
- PlotEllipse above for aspect considerations.
-
- ------------------------------------------------------------------------------
-
- Procedure PlotCircle:
-
- Draws a true circle on the screen regardless of world and window
-
- chosen. X and Y determine the center of the circle, while R is the radius
-
- MEASURED IN X UNITS. NOTE: the invisible graphics cursor is NOT updated.
-
- ------------------------------------------------------------------------------
-
- Procedure Flood:
-
- A closed curve may be filled with color. X, Y are the world coordinates
-
- of any interior point. FillColor is the color used to paint the interior.
-
- BorderColor is the color in which the curve to be filled is drawn.
-
- ---------------------------------------------------------------------------
-
- Procedure SaveImage:
-
- Up to 10 rectangular screen regions or images may be saved in memory,
-
- specifically on the heap. Num is the image number or index, while Xmin, Xmax,
-
- Ymin, Ymax are the world coordinates describing the rectangle. Since any
-
- data structure is limited to 64K bytes, there is a limit to the size of image
-
- which can be saved. An error message is issued if the region is too large
-
- to save, or if not enough memory is available.
-
- -------------------------------------------------------------------------
-
- Procedure UnSaveImage:
-
- Image number Num is unloaded from memory, freeing the memory for use.
-
- Image number Num is no longer valid until some image is saved using this index.
-
- ------------------------------------------------------------------------------
-
- Procedure ClearImage:
-
- The referenced image is erased (XORed) to background on the screen. The
-
- image is still saved in memory and may be placed back on the screen. See
-
- below.
-
- ------------------------------------------------------------------------------
-
- Procedure PlotImage:
-
- This procedure draws a saved image in the current window using the
-
- current world coordinates. Xlow and Yhi specify the location for
-
- placement of the upper lefthand corner of the rectangular image. PutType
-
- specifies the BitBlt operation used. The allowed values are :
-
- NormalPut : Copies bitmap image to screen.
- XORPut : XOR's bitmap image to screen.
- ORPut : OR's bitmap image to screen.
- AndPut : AND's bitmap image to screen.
- NotPut : NOT's bitmap image to screen.
-
- ------------------------------------------------------------------------------
-
- Procedure MoveImage:
-
- The referenced image is erased (XORed) to background on the screen. It
-
- is then redrawn at the specified coordinates. Xlow and Yhi are the world
-
- coordinates for placement of the upper lefthand corner of the image rectangle.
-
- ------------------------------------------------------------------------------
-
- Procedure CrossCursor:
-
- This procedure will draw a cursor on the screen at the center of the
-
- current window. The cursor may be moved a single pixel unit horizontally or
-
- vertically with the ARROW keys. Home, End, PageUp and PageDown keys cause
-
- similar movements of 10 pixel units. The background is preserved. The world
-
- coordinates of the center of the cursor are returned through the real
-
- variables CursorX and CursorY. If desired, the values of these coordinates
-
- may be displayed on the screen as the cursor is moved. The formal parameters
-
- are defined as follows:
-
- ColorCursor : WORD Color of cursor.
- ShowXY : BOOLEAN TRUE => display CursorX and CursorY.
- Col, Row : INTEGER Text position for display if ShowXY = TRUE.
- ColorText : WORD Color of displayed text if ShowXY = TRUE.
-
- Press <ENTER> to exit the procedure.
-
- ------------------------------------------------------------------------------
-
-
-
- Procedure BoxCursor:
-
- This procedure is similar to CrossCursor. A rectangular box cursor is
-
- placed at the center of the current window. The cursor may be moved 20% of
-
- the box dimension by use of the ARROW keys. The background is preserved.
-
- The (+) plus and (-) minus keys are used to expand or shrink the box. The
-
- coordinates of the corners of the box are available to the calling program
-
- through the real variables BoxXmin, BoxXmax, BoxYmin and BoxYmax.
-
- Formal parameters are:
-
- ColorCursor : WORD Color of cursor.
- ShowXY : BOOLEAN TRUE => display CursorX and CursorY.
- Col, Row : INTEGER Text position for display if ShowXY = TRUE.
- ColorText : WORD Color of displayed text if ShowXY = TRUE.
-
- Press <ENTER> to exit the procedure.
-
- ------------------------------------------------------------------------------
-
- Procedure GetPixelArea:
-
- The approximate area of a closed curve of color CurveColor is computed
-
- based on the World in effect. The interior must not be of the same color as
-
- CurveColor. As the area is scanned, the interior is colored with RefillColor.
-
- The method is to count the pixels of CurveColor and use XperPixel and
-
- YperPixel to caculate the approximate area. Accuracy depends on size.
-
- ------------------------------------------------------------------------------
-
- Function MouseOK:
-
- The presence of the mouse hardware and driver are examined. If both are
-
- present, the value TRUE is assigned, otherwise FALSE is assigned. The mouse
-
- system is reset.
-
- ------------------------------------------------------------------------------
-
- Procedure RestrictMouseToWindow:
-
- The mouse cursor is restricted to move only in the current window.
-
- ------------------------------------------------------------------------------
-
- Procedure GetMouseXY:
-
- The current real world coordinates of the mouse cursor are returned.
-
- ------------------------------------------------------------------------------
- Function LeftMouseXY:
-
- If returned TRUE, then X and Y are the real world coordinates of the mouse
-
- cursor AND the LEFT BUTTON is currently pressed, ELSE X, Y are not valid.
-
- ------------------------------------------------------------------------------
-
- Function RightMouseXY:
-
- Same as LeftMouseXY, but refers to RIGHT BUTTON currently pressed.
-
- ------------------------------------------------------------------------------
-
- Function LeftButtonClicked:
-
- If LEFT BUTTON has been released since last use of this function, TRUE
-
- is returned, and X, Y are real world coordinates of the mouse cursor when last
-
- released. If FALSE there has been NO CLICK and X, Y are not valid.
-
- ------------------------------------------------------------------------------
-
- Function RightButtonClicked:
-
- Same as for LeftButtonClicked, but refers to RIGHT BUTTON released.
-
- ------------------------------------------------------------------------------
-
- Procedure MousePointer:
-
- The mouse cursor appears, restricted to the current window. If Show is
-
- TRUE, then the X and Y coordinates of the cursor are updated at the indicated
-
- text line and column as the cursor is moved. Also, the message CLICK LEFT
-
- TO EXIT is displayed on the same line. Whether or not SHOW is TRUE, the
-
- exit values of X and Y are returned.
-
- ------------------------------------------------------------------------------
-
- Procedure MouseRubberBox:
-
- The mouse cursor appears, restricted to the current window. Move cursor
-
- and CLICK LEFT to mark upper left corner of a rectangle. Move cursor down
-
- and to right expand the rectangle. CLICK LEFT to set lower right corner.
-
- Now move cursor to move rectangle about screen. CLICK LEFT once more to exit.
-
- IF EraseBox is TRUE the rectangle is erased from screen on exit. The values
-
- of the extremes of the rectangle are returned in X1, X2, Y1, Y2.
-
- ------------------------------------------------------------------------------
-
- Procedure MouseRubberLine:
-
- The mouse cursor appears, restricted to the current window. Move cursor
-
- and then CLICK LEFT to mark the beginning of a line segment at (X1, Y1). Move
-
- cursor to obtain a line from (X1, Y1) to the current cursor position (X2, Y2).
-
- CLICK LEFT to anchor line and exit. The values of X1,Y1,X2,Y2 are returned.
-
- If EraseLine is TRUE, the line is erased on exit.
-
- ------------------------------------------------------------------------------
-
- Procedure MouseDraw:
-
- The mouse cursor appears, restricted to the current window. PRESS LEFT
-
- while moving mouse to draw. RELEASE to stop drawing. CLICK RIGHT to exit.
-
- ------------------------------------------------------------------------------
-
- Procedure CopyToEpson:
-
- Causes a copy of the CURRENT window graphics to be copied to the system
-
- printer. To be used if printer is EPSON compatible. If multiple windows
-
- are in use, define one window to be the entire screen; selecting this one will
-
- result in the entire screen (all windows) being copied to Epson. Note that all
-
- windows are the entire screen by default.
-
- ------------------------------------------------------------------------------
-
- Procedure CopyToHPLaserJet:
-
- Same as CopyToEpson above, except for use with HP LaserJet printer.
-
-
-
-
-
-
-
-