A pen trail with varying transparency

Pen transparency is a value of the pen. It is analogous to the ghost effect, but determines how see-through the pen trail should be. 0, the default, means opaque and 100 means completely invisible.

The pen transparency can be changed using the Set Pen () to () and Change Pen () by () blocks.

History

Pen transparency was first added to Scratch 2.0 v435.2,[1] however, its use was very unobvious because it could only be used by dropping a reporter whose value is a number representing the color into the color input of the Set Pen Color to () block. In Scratch 3.0, the Set Pen () to () and Change Pen () by () blocks were added, both of which have a transparency option, making pen transparency much easier to use.

Workaround

Pen transparency works by alpha compositing. To do without pen transparency, one could store the color of each pixel on the stage in a list, and then to draw a pen trail combine the original color of each pixel covered with the desired pen color before updating both the color in the list and the color on the stage using the pen.

See Also

References

Cookies help us deliver our services. By using our services, you agree to our use of cookies.