📄 hsa_graf.doc
字号:
13-Jul-87 Page 14
Hardwood Software Associates
HSA_GRAF - Screen Graphics Library (V1.01)
HSA_GRAF - Screen Graphics Library (V1.01)
GR_ARC - Draw Circular Arcs
___________________________
NAME: GS_ARC - Draw a circular arc (scaled)
GS_ARC
int x1; X coordinate of start of arc
(0 <= x1 <= max X*xdots*1000)
int y1; Y coordinate of start of arc
(0 <= y1 <= max Y*ydots*1000)
int x2; X coordinate of end of arc
(0 <= x2 <= max X*xdots*1000)
int y2; Y coordinate of end of arc
(0 <= y2 <= max Y*ydots*1000)
int xc; X coordinate of center of arc
(0 <= x2 <= max X*xdots*1000)
int yc; Y coordinate of center of arc
(0 <= y2 <= max Y*ydots*1000)
int cw; Direction of arc:
1 = Clockwise
0 = Counterclockwise
DESCRIPTION: Draw a circular arc using scaled coordinates from
(x1,y1) to (x2,y2) centered at (xc,yc).
13-Jul-87 Page 15
Hardwood Software Associates
HSA_GRAF - Screen Graphics Library (V1.01)
HSA_GRAF - Screen Graphics Library (V1.01)
GR_HERC - Hercules Graphics Support
___________________________________
NAME: G_PAGE - Set graphics page for Hercules
G_PAGE
SYNOPSIS: g_page (page);
int page; Page to use for all
subsequent calls
DESCRIPTION: Set the current graphics page that will be used for
all subsequent graphics calls.
RETURNS: 0 - successful
-1 - Invalid page
GR_GETS - Get a String from User in Graphics Screen
___________________________________________________
NAME: G_GETS - Get a string from console in graphics mode
G_GETS
SYNOPSIS: char *g_gets (buffer);
char *buffer; Buffer for input string
DESCRIPTION: Operates just like "gets". Reads a string from the
keyboard, echoing to the graphics screen. The
terminating newline is replaced with a null byte.
RETURNS: Pointer to string
13-Jul-87 Page 16
Hardwood Software Associates
HSA_GRAF - Screen Graphics Library (V1.01)
HSA_GRAF - Screen Graphics Library (V1.01)
Alphabetical List of HSA_GRAF Functions
_______________________________________
DISP_GRAPH Set the display to graphics mode
DISP_TEXT Set the board to the text mode
GS_ARC Draw a circular arc (scaled)
GS_LINE Draw a line (scaled)
GS_LOC Return current location (scaled)
GS_POINT Set a point (scaled)
GS_R_POINT Return the color of the specified point
GS_STR_H Display a horizontal message on screen
G_BACK_COLOR Set background color
G_BS_H Back space one character position
G_CGA_HR Use IBM CGA in high resolution (640x200)
G_CLR Clear the current graphics page
G_DASH Set line type to dashed
G_DELAY Set delay for screen switching
G_DOT Set line type to dotted
G_EGA_HR_CO Use IBM EGA in high resolution
G_FILL Fill an area from a seed
G_FORE_COLOR Set foreground color
G_GETS Get a string from console in graphics mode
G_HERC Use Hercules monochrome graphics board
G_LINE Draw a line
G_LOC Return current location
G_MODE Set mode for screen drawing
G_ORIGIN Set screen origin location
G_OTHER Use another variety of graphics adapter
G_PAGE Set graphics page for Hercules
G_POINT Set the specified dot in the current
G_RESTORE Restore the graphics screen image from buffer
G_REVERSE_COLOR Swap foreground and background
G_R_ORIGIN Return the current origin location
G_R_POINT Return the color of the specified point
G_SAVE Save the current graphics screen image in buffer
G_SCALE Set screen scale factors
G_SET_LINE Set line type mask
G_SOLID Set line type to solid
G_STATE Returns current video state
G_STR_H Display a horizontal message on screen
13-Jul-87 Page 17
Hardwood Software Associates
HSA_GRAF - Screen Graphics Library (V1.01)
HSA_GRAF - Screen Graphics Library (V1.01)
Companion Library
_________________
Hardwood Software Associates has developed companion library to the
HSA_GRAF library.
HSA_TEXT is a library of C functions that provide direct, fast control
over the IBM PC screen in text mode. The functions have been developed
and tested for the Microsoft versions 3.00 and 4.00 and Lattice
version 3.10 C compilers. This library has two divisions. All basic
screen control functions begin with the prefix "tx_". The window control
functions all begin with "w_". The library is contained in several
modules, grouped by function.
13-Jul-87 Page 18
Hardwood Software Associates
HSA_GRAF - Screen Graphics Library (V1.01)
HSA_GRAF - Screen Graphics Library (V1.01)
Alphabetical List of HSA_TEXT Functions
_______________________________________
TX_ATTR Read the current screen attribute
TX_ATTR_SET Set the current screen attribute
TX_BIOS Use BIOS for all I/O
TX_BLINK Set to blinking white on black
TX_BOLD Set to intense white on black
TX_B_B Set to intense blinking white on black
TX_CHR Display a character at a specified location
TX_CHR_A Display character using specified location and attribute
TX_CHR_A_C Continue display of character with specified attribute
TX_CHR_C Continue display of character
TX_CHR_O Display a character only at specified location
TX_CHR_O_C Display a character only, continued from current location
TX_CLR Clear the entire screen
TX_CLR_EOL Clear to the end of the line
TX_CLR_ROWS Clear a block of lines on the screen
TX_COL Read the current cursor column
TX_CONF Set crt screen memory address and 6845 address
TX_CUR_HIDE Hide the cursor
TX_CUR_SET Set the cursor start / stop scan lines
TX_CUR_SHOW Show the cursor
TX_DIRECT Access screen hardware directly
TX_DOWN Move the current location one row down
TX_FILL Fill a line with the specified number of a character
TX_FILL_A Fill a line with the specified number of a character
TX_FILL_A_C Fill a line with the specified number of a character
TX_FILL_C Fill a line with the specified number of a character
TX_GET_STATUS CRT status save
TX_LEFT Move the current location one column left
TX_LOC Set the current location
TX_NL Move the current location to the start of the next line
TX_NORM Set to white on black
TX_NO_COL Read the number of columns in screen
TX_NO_SNOW Don't wait for retrace to prevent snow
TX_PUT_STATUS CRT status restore
TX_RD_BLK Read a block of screen data
TX_RD_BLK_C Read a block of screen data, at current location
TX_RD_STR Read string from screen
TX_RD_STR_C Read string from screen at current location
TX_REVERSE Set to black on white
TX_RIGHT Move the current location one column right
TX_ROW Read the current cursor row
TX_SCDN Scroll window down one line
TX_SCUP Scroll window up one line
TX_SNOW Wait for retrace to prevent snow
TX_STATE Returns current video state
TX_STR Display string at specified location
TX_STR_A Display string using specified location and attribute
TX_STR_A_C Display a string, continued from current location
13-Jul-87 Page 19
Hardwood Software Associates
HSA_GRAF - Screen Graphics Library (V1.01)
HSA_GRAF - Screen Graphics Library (V1.01)
TX_STR_C Display a string, continued from current location
TX_UNDER Set to underlined
TX_UP Move the current location one row up
TX_WR_BLK Write a block of screen data
TX_WR_BLK_C Write a block of screen data, at current location
W_BOT_MSG Display a message in the bottom border line
W_CLOSE Close a window
W_CLR Clear a window
W_CUR_LOC Display the screen cursor in the window
W_MENU1_FILL Fill a style 1 menu with data
W_MENU1_OPEN Open a menu style 1 window
W_MOVE Move a window
W_OPEN Open a window
W_SCDN Scroll data in window down
W_SCUP Scroll data in window up
W_STR Display a string in a window
W_STR_C Display a string in a window, at current location
W_STR_A Display a string in a window, with attribute
W_STR_C_A Display a string in a window, at current location
W_STR_COL Display a string in a window column
W_TOP_MSG Display a message in the top border line
W_USER_BORDER Set characters for user border
13-Jul-87 Page 20
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -