SETTURTLEMODE mode
Sets the bitmap mode for the currently selected turtle. The bitmap mode controls how bitmapped turtles (see BITMAPTURTLE) paste their image onto the screen. Sometimes you want the background erased and sometimes not. Sometimes you wish to invert the image before pasting it and sometimes not.
The mode
input must be an integer from 1 to 9.
The meaning of each value is given by the following table:
Mode | Turtle Image |
---|---|
1 | The bitmap in memory, without modification |
2 | A bitwise OR of the bitmap in memory and the screen |
3 | A bitwise AND of the bitmap in memory and the screen |
4 | A bitwise XOR of the bitmap in memory with the screen |
5 | A bitwise AND of the bitmap in memory with the bitwise inversion of screen |
6 | A bitwise inversion of the bitmap in memory |
7 | A bitwise OR of the bitmap in memory with the bitwise inversion of the screen |
8 | A bitwise OR of the bitwise inversion of the bitmap in memory and the screen |
9 | A bitwise inversion of the screen |
SETTURTLEMODE has no effect if the selected turtle is not currently bitmapped. It is an error to run SETTURTLEMODE on a turtle that was bitmapped with a rotating bitmap.
Use SETTURTLE to select a different turtle.
Use TURTLEMODE to obtain the selected turtle's mode.
Use BITMAPTURTLE to map a turtle to a bitmap.
; Fill the screen with white
SETSCREENCOLOR [255 255 255]
CLEARSCREEN
; Draw a circle and fill it with red
PENDOWN
CIRCLE 50
SETFLOODCOLOR [255 0 0]
FILL
; Copy the red circle to the clipboard
PENUP
SETXY -50 -50
BITCOPY 101 101
; Use a simple copy for the turtle's mode
BITMAPTURTLE
; Fill the screen with yellow
SETSCREENCOLOR [255 255 0]
; Notice that the white corners show up when using the default turtle mode
; Set the turtle mode to AND the image onto the background
SETTURTLEMODE 3
; Notice that the white corners disappeared