Pen

pen
Extension Description
Pen Extension allows sprites to control their pens, as well as stamp themselves onto the stage and remove all pen marks.

Introduction

The Pen Extension allows sprites to control their pens, as well as stamp themselves onto the stage and remove all pen marks. To use them, they must be enabled in the “Extensions” section of the editor.

Pen blocks are useful when creating a one sprite one script project, allowing the following actions to happen:

  1. Stamp the sprite
  2. Put the pen down
  3. Release the pen

One example of a one sprite one script project is a simple drawing program. The pen extension can also be used to make games, simulations, 3D projects, and other projects.

Making a Triangle

Read More

PictoBlox Blocks

When used in a script, the sprite will produce a bitmap image of itself which is stamped onto the stage. (Because it is merely a picture of the sprite and not a sprite itself, it cannot be programmed.) Like other Pen blocks, the Stamp block will not draw over sprites. The erase all block removes all stamped images.
The block removes all marks made by the pen or stamping. It is the only pen block that the Stage can use.
The block will make its sprite continuously pen a trail wherever it moves until the Pen Up block is used. The color, size, and transparency of the trail can be changed with other blocks.
If a sprite is currently using the pen because of the Pen Down block, the block will cause the sprite to stop drawing a trail. (Otherwise, it has no effect.)
The block sets the pen’s color to the given color, which can be selected by clicking on the input.
This block sets the pen’s color, saturation, brightness (also known as shade), and transparency. The first value can be selected from “color” (default), “saturation”, “brightness”, and “transparency”.
The block changes the specified value by the number input. 
The block sets the Pen Size to the given number. The pen draws a trail of circles. The diameter of the circle, in pixels, is equal to the pen size.
The block changes the pen size by the specified amount.
All articles loaded
No more articles to load

Block Coding Examples

All articles loaded
No more articles to load

Python Functions

The function is used when the sprite needs to produce a bitmap image of itself which is stamped onto the stage. (Because it is merely a picture of the sprite and not a sprite itself, it cannot be programmed). The function will not draw over sprites. 
Syntax: stamp()
The function removes all marks made by the pen or stamping. It is the only pen block that the Stage can use.
Syntax: clear()
The function will make its sprite continuously pen a trail wherever it moves until the up() function is used. The color, size, and transparency of the trail can be changed with other functions.
Syntax: down()
If a sprite is currently using the pen because of the down() function, the up() function will cause the sprite to stop drawing a trail. (Otherwise, it has no effect.)
Syntax: up()
The function sets the pen’s color to the given color – (R, G, B).
Syntax: setcolor(color = [0, 0 , 0])
The function changes the specified value by the number input.
Syntax: changecolor(parameter = “color”, value = 10)
The function sets the Pen Size to the given number. The pen draws a trail of circles. The diameter of the circle, in pixels, is equal to the pen size.
Syntax: setsize(size = 1)
The function changes the pen size by the specified amount.
Syntax: changesize(size = 1)
All articles loaded
No more articles to load

Python Coding Examples

All articles loaded
No more articles to load
Table of Contents