Eng:Pen Blocks

Pen blocks is one of the ten categories of Scratch blocks. They are color-coded dark-green, and are used to control the pen aspect of the Scratch Program.

There are eleven Stack blocks in this category.

According to the Scratch Statistics, this is the least used category, with only over 2,000 uses.

Pen blocks are useful when creating a one sprite one script project, allowing one to take various actions: One example of a one sprite one script project is a simple drawing program.
 * Stamp the sprite
 * Put the pen down
 * Release the pen

Blocks
Scratch 2.0 has the following eleven Pen Stack blocks:


 * clear
 * stamp
 * pen down
 * pen up
 * set pen color to [#F3A533]
 * change pen color by (10)
 * set pen color to (0)
 * change pen shade by (10)
 * set pen shade to (50)</sb>
 * change pen size by (1)</sb>
 * set pen size to (1)</sb>

The pre-alpha of Scratch 2.0 from Scratch Day @ MIT 2011 additionally had the following Pen Stack block:
 * stamp transparent //category=pen</sb>

Suggested Pen Blocks
<pen down?> // category=pen // category=pen // category=pen // category=pen

These are wanted by many Scratchers, as they would make programming much easier. The first would return the Boolean value of true if the pen is down. The second would return the pen color value; the third, the pen shade value; the last, the pen size value. Some Scratch Modifications have at least one of these. Workarounds are possible by maintaining variables to that keep up with these values and updating them whenever the pen state/color/size/shade are changed, possibly by leaving a separate script running that alters the pen when the variables are changed, and only modify the variables in other scripts instead of changing the pen attributes directly.