SCROLLX deltax
Scrolls the horizontal scrollbar of the "Screen" window.
The deltax
input is the number of pixels to scroll horizontally.
A positive number scrolls to the right and a negative number scrolls to the left.
If deltax
is 0, then the scroller is reset to the center position.
The following procedure scrolls the screen window to put the turtle in view. It first resets the scrolling position to the center, so that it can scroll to a known absolute location.
TO FINDTURTLE
ZOOM 1 ; zoom such that 1 turtle step = 1 pixel
SCROLLX 0 ; center the horizontal scrollbar
SCROLLY 0 ; center the vertical scrollbar
SCROLLX XCOR ; scroll the distance from the center to turtle's x coordinate
SCROLLY -YCOR ; scroll the distance from the center to turtle's y coordinate
END