This page describes the properties that the
TURTLE widget offers in
addition to the WIDGET and BITMAP properties.
The following commands are also implemented as callable properties so you can ASK a turtle to perform the command:
PENDOWN, PENUP, PENERASE, PENREVERSE, PEN, SETPEN, PENDOWN?, PATTERN, SETPATTERN, PENCOLOR, SETPC, WIDTH,SETWIDTH, DOT, DOT?, DOTCOLOR, FILL, STAMPOVAL, STAMPRECT, TURTLETEXT, ALPHA, and SETALPHA.
Controls the transparency of the colors the turtle uses to draw.
ALPHA gets or sets the alpha value that the turtle uses to draw with colors that do not have a specific alpha value, like color names, color indexes, or color lists with only three elements. When drawing, the turtle adds this value to any three-element color. A value of 1 makes the color opaque, and a value of 0 makes it completely transparent (invisible).
SETPC “YELLOW (STAMPOVAL 100 100 TRUE) PPROP 0 “ALPHA 0.5 SETPC “RED (STAMPRECT 100 100 TRUE)
Reports or sets the current fill pattern.
PATTERN contains the pattern that a turtle uses to fill shapes. This may be a value, an 8-element list, or the name of a bitmap whose black-and-white representation is used to fill an area. See the SETPATTERN command for details. Note that the FILL command does not use patterns, only solid colors.
SETPATTERN 1 (STAMPRECT 100 100 TRUE)
Contains the current pen color.
PENCOLOR contains the current pen color as a four–element list.
GPROP 0 “PENCOLOR Result: [0 0 0 1]
Controls the turtle’s pen state.
PENSTATE controls the state of the turtle pen, one of the words
GPROP 0 “PENSTATE Result: PENDOWN
Gets or sets the turtle’s pen width.
PENWIDTH gets or sets the size of the turtle pen in pixels.
GPROP 0 “PENWIDTH Result: 1
Gets or sets the turtle’s shape.
The turtle’s shape is the name of another object (usually a bitmap or a
bitmap file) that is used to represent the turtle. Setting the
property to the empty word sets the standard turtle shape.
If the LOADSHAPE command loaded the shape, the property value is the name of the file what was loaded. The widget with that name does not need to exist.
GPROP 0 “SHAPE Result: