Lee,
Yes, coordinate numbers matter, because they determine exactly which part of the screen is captured as the picture designated "ball". If we capture the wrong part of the screen, the ball doesn't get drawn correctly or doesn't get drawn at all. Consider the following explanation.
So, here's our blank screen after the commands, SCREEN 13 and CLS:
Code: Select all
CIRCLE (20,20), 5, 4
PAINT (20,20), 4
Then we draw the ball at position (20,20) on the screen using the CIRCLE command:
(the number 5 indicates the radius of the circle, the number 4 indicates the color red; as noted, the PAINT command fills in the circle.)
Note that for the CIRCLE command, (20,20) indicates the
center of the circle.
When GET captures, the picture, it copies a square-shaped section of the screen into memory noting the colors of each pixel. The first set of coordinates identify the top lefthand corner of the section we wish to capture (14,14), and the second set of coordinates identify the bottom righthand corner (26,26).
If we use the wrong coordinates, we capture the wrong part of the screen. For example if we start capturing the picture of the ball from the center of the circle:
or in some other random area of the screen:
The coordinates you asked about (11,11)-(26,26) would be ok, because they would include the entire ball in the area of the screen captured. However, it's usually best to capture a rectangular area of the screen that only just barely includes the entire picture you want to use.
The example code that only uses CIRCLE and LINE works fine no matter where you redraw the ball, even if you draw it offscreen. However, PUT requires you to draw the picture completely onscreen or it causes an error. You can't draw any part of the picture offscreen when you use PUT.