Radio Shack TRS-80 Operation Manual page 75

Hide thumbs Also See for TRS-80:
Table of Contents

Advertisement

position:
Computer Graphics
Operation Manual
- - - - - - - - - - T R S · B O
@ - - - - - - - - - -
The first two bytes of array are set to the horizontal
(X-axis) number of pixels in the pixel areaithe second two
bytes are set to the vertical (Y-axis) number of pixels in
the pixel area. The remainder of array represents the
status of each pixel (either ON or OFF) in the pixel area.
The data is stored in a row-by-row format. The data is
stored eight pixels per byte and each row starts on a byte
boundary.
Array Limits
When the array is defined, space is reserved in memory for
each element of the array. The size of the array is
limited by the amount of memory available for use by your
program -- each real number in your storage array uses
four memory locations (bytes).
The array must be large enough to hold your graphic
display and the rectangular area defined must include all
the points you want to store.
To determine the minimum array size:
1.
Divide the number of X-axis pixels by 8 and round
up to the next higher integer.
2.
Multiply the result by the number of Y-axis pixels.
When counting the X-Y axis pixels, be sure to include
the first and last pixel.
3.
Add four to the total.
4.
Divide by four (for real numbers) and two (for integers)
rounding up to the next higher integer.
(Note: If
you're using a LOGICAL array, the result of step #3
above will produce the desired array size.)
When using arrays, the position and size of the
rectangular pixel area is determined by the current and
previous (x,y) coordinates.
upper left corner
=
startpoint
=
(xl,yl)
lower left corner
=
endpoint
=
(x2,y2)
Size (in pixels):
width
=
x2-xl+l
length
=
y2-yl+l
----------Itadlelllaell----------
-97-

Advertisement

Table of Contents
loading

Table of Contents