SETPIXEL colorvector
Sets the pixel under the turtle to the color described by colorvector
.
The colorvector
input must be a three item list of [red green blue] intensities, each of which must be an integer from 0 to 255.
For an explanation of color vectors see Using Color.
SETPIXEL is similar to running SETPENSIZE 1 SETPENCOLOR colorvector PENPAINT FORWARD 0
, except that SETPIXEL is faster and doesn't affect the pen state.
By using PIXEL and SETPIXEL, you can scan and redraw an image at a new orientation (for example, to rotate a bitmap).
SETPIXEL can be used in PERSPECTIVE mode but only the "closest" pixel set is seen.
See Examples\3D\3DBITMAP.LGO
for an example of using SETPIXEL in perspective mode.
PENUP
SETXY -128 -128
FOR [red 0 255] [
FOR [green 0 255] [
SETPIXEL (LIST :red :green 0)
FORWARD 1
]
BACK 256
RIGHT 90
FORWARD 1
LEFT 90
]