gscatt
Purpose
Sets the attributes of the single-color cursor.
C Syntax
int gscatt_ (color, width, height, pattern, 0x, 0y)
int *color, *width, *height, *pattern, *0x, *0y;
FORTRAN Syntax
INTEGER function gscatt (color, width, height, pattern, 0x, 0y)
INTEGER color, width, height, pattern, 0x, 0y
Pascal Syntax
FUNCTION gscatt_ (
VAR color, width, height: INTEGER;
pattern: ARRAY [1..k| of INTEGER;
0x, 0y: INTEGER
): INTEGER [PUBLIC|;
Description
The gscatt subroutine defines the single-color cursor for
the GSL. The gscmap subroutine must initialize the color
map before gscatt can be called.
Only one cursor, either the single-color cursor or the
multi-color cursor, can be active in the GSL at any one
time. The gscatt subroutine forces all subsequent calls
to the gsmcur and gsecur subroutines to operate on the
single-color version of the cursor. To change from the
multi-color cursor to the single-color cursor, erase the
cursor with gsecur, then call the gscatt subroutine.
Parameters
color Refers to an entry in the color map. If the
index value is -1, the attribute is unchanged.
width, height Define, in pixels, the width and height of
the bit pattern to be used as the cursor. If
width or height equals -1, then the pattern
remains unchanged.
pattern Defines the image used as a cursor. The
ceiling (width/32) indicates the number of
words per row and height indicates the number
of rows. The cursor data must be supplied in
row (scan line) major order. If width implies
partial use of a word, the rest of the word is
unused. To fully define the cursor pattern,
pattern should be (ceiling(width/32)Sheight)
words in length.
0x, 0y Indicate the origin of the cursor relative to
the lower leftmost corner (0, 0) of the cursor
pattern. The origin must be placed within the
cursor pattern: 0x < width and 0y < height.
The origin of the cursor is placed at the posi-
tion indicated, when the application moves the
cursor using the gsmcur subroutine. If x
equals -1, then the origin remains unchanged.
The maximum size of the cursor is device dependent and
can be determined by using the gsqdsp subroutine.
You cannot change the cursor attributes while the cursor
is visible.
There is no default cursor defined, so all cursor parame-
ters must be set before the cursor is displayed.
For Pascal, the application must declare the array passed
as being fixed length and declare the routine as
accepting arrays of that length. The k in the routine
declaration must be a constant.
Return Value
GS_SUCC Successful.
GS_COLI Invalid color index.
GS_CURS Cursor size invalid.
GS_CURO Cursor origin invalid.
GS_CURV Cursor visible.
Related Information
In this book: "gsecur," "gsmcat," and "gsmcur."