Commodore 128 Programmer's Reference Manual page 78

Hide thumbs Also See for 128:
Table of Contents

Advertisement

68
COMMODORE 128
SSHAPE / GSHAPE
Save/retrieve shapes to/from string variables
SSHAPE and GSHAPE are used to save and load rectangular areas of bit map
screens to/from BASIC string variables. The command to save an area of the bit map
screen into a string variable is:
SSHAPE string variable, XI, Yl [,X2,Y2]
where:
string variable
String name to save data in
X1,Y1
Corner coordinate (0,0 through 319,199) (scaled)
X2,Y2
Corner coordinate opposite (XI,Yl) (default is the PC)
The command to retrieve (load) the data from a string variable and display it on
specified screen coordinates is:
GSHAPE string variable [X,Y][,mode]
where:
string
Contains shape to be drawn
X,Y
Top left coordinate (0,0 through 319,199) telling where to draw the shape
(scaled—the default is the pixel cursor)
mode
Replacement mode:
0 = place shape as is (default)
1 = invert shape
2 = OR shape with area
3 = AND shape with area
4 = XOR shape with area
The replacement mode allows you to change the data in the string variable so you can
invert it, perform a logical OR, exclusive OR (turn off bytes that are on) or AND
operation on the image.
EXAMPLES:
SSHAPE A$, 10,10
Saves a rectangular area from the coordinates 10,10
to the location of the pixel cursor, into string vari
able A$.
SSHAPE B$,20,30,43,50
Saves a rectangular area from top left coordinate
(20,30) through bottom right coordinate (43,50) into
string variable B$.
SSHAPE D$, + 10, + 10
Saves a rectangular area 10 pixels to the right and
10 pixels down from the current position of the pixel
cursor.
u
y
u
u
u
u
u

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents