RaptorGraph Overview

RaptorGraph lets the programmer output graphic images to a window.  In addition, it provides functionality to interact with the user via the mouse and via individual keystrokes on the keyboard.

 

RaptorGraph Coordinates

 

The program opens a RaptorGraph window using the Open_Graph_Window call, in which the size of the window is specified.  A successfully opened window appears with a white background.  RaptorGraph drawing routines rely on a standard coordinate system, in which the origin is at the lower-left hand corner.  Actually, the bottom leftmost pixel on the RaptorGraph window has the coordinate (1,1).  When the program requests the mouse's position or the location of a click, these will be given using the same coordinate system.

 

The picture below shows the coordinate layout for a RaptorGraph window opened with Open_Graph_Window(400,300).

 

 

 

Drawing Operations

 

The drawing routines can output a variety of shapes in a variety of colors.  

 

Mouse Operations

 

The Mouse routines can determine the current location of the mouse or the location of the last mouse click.  They can determine whether or not a mouse click has occurred.

 

Keyboard Operations

 

The Keyboard routines can determine if a keystroke has occurred.  They can return keystrokes either as ASCII codes or as strings.

 

Window Operations

 

The Window routines can set and determine characteristics of the RaptorGraph window.  The Freeze_Graph_Window and Update_Graph_Window calls can smooth the display of animations.

 

 

Note:  The RaptorGraph window must be open when most of these routines are called, or a run-time error will occur.  See individual help pages for details.