Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 106 - 2609_Logiccode
P. 106

    CREATING SHAPES

                      We have learnt how to control sprites in the previous chapter. In this chapter, we will learn
                      about creating shapes. Thus, we can repeat the actions of a stack of blocks by making use
                      of the various blocks in the Control block category.

                      PEN BLOCK

                      Pen blocks provide a trail for the sprite and give instructions to change the colour, size
                      and shade of the trail. These blocks are colour-coded as dark green and used to draw
                      shapes in Scratch. We can add pen blocks by clicking on the Add Extension button, then
                      clicking on Pen extension to add it. Let us read pen blocks and their functions.

                                          Blocks                                           Functions

                             pen down                                    It places the pen in the down position.

                             pen up                                      It disables drawing operations by lifting the
                                                                         pen.

                             set pen color to                            It specifies  the colour to  be used  while
                                                                         drawing.

                             Change pen color           by 10            It modifies the colour of a line.

                                                                         It modifies the thickness of the pen. You can
                             Change pen by  1                            also change the thickness by writing the de-
                                                                         sired number in the number box, number 1
                                                                         being the least thick.

                             stamp                                       It draws or stamps  the  image  of a sprite
                                                                         onto the stage.

                             erase all                                   It erases the pen marks from the stage.

                      Drawing a Line
                      To draw a line, follow the given steps:

                      Step  1    Drag a  when     clicked   block to the scripts area from the Events menu.

                      104   Premium Edition-IV

| 101 102 103 104 105 106 107 108 109 110 111 |