statement/SSHAPE statement/SSHAPE
NAME
SSHAPE -- Saves a rectangular graphic area into a string variable
ABBREVIATION
s <shift> S
SYNOPSIS
SSHAPE <shape>,<left>,<top>[,<right>,<bottom>]
FUNCTION
This statement is used to save a rectangular area of multicolor or high
resolution screen using BASIC string variable.
Because BASIC limits string lengths to 255 characters, the size of the
area you may save is limited. The string size required can be calculated
using one of the following (unscaled) formulas:
L(mcm) = INT((ABS(<left>-<right>)+1)/4+.99)*(ABS(<top>-<bottom>)+1)+
L(h-r) = INT((ABS(<left>-<right>)+1)/8+.99)*(ABS(<top>-<bottom>)+1)+
(mcm) refers to multi-color mode; (h-r) is high resolution mode.
The shape is saved row by row. The last four bytes of the string contain
the column and row lengths less one (i.e.: ABS(<left>-<right>)) in
low/high byte format (if scaled divide the lengths by 3.2 (X) and 5.12
(Y)).
INPUTS
<shape> - string variable where shape sould be stored
<left> - scaled corner coordinate
<top> - scaled corner coordinate
<right> - scaled corner coordinate
<bottom> - scaled corner coordinate
RESULT
Saves a defined rectangular graphic area into a BASIC string variable.
EXAMPLES
SSHAPE V$,0,0
Saves screen area from the upper left corner to where the cursor is
positioned under the name V$.
NOTES
None
BUGS
None
SEE ALSO
GRAPHIC
GSHAPE