Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 63 - 2612_Digimind
P. 63

    Step 18  Click on the Colors block from the Blocks palette to open its blocks.

                     Step 19  Drag the red colour block and connect it to the set Canvas1.PaintColor block.
                                 Similarly, add the given blocks to change the paint colour on the Canvas: when Button2.

                               Click, set Canvas1.PaintColor to blue; and when Button3.Click, set Canvas1.PaintColor
                               to green.

                     Step 20  Click on the Button4 block from the Blocks palette to open its blocks.

                     Step 21  Drag the when Button4.Click block to the workspace.

                     Step 22  Click on the Canvas1 block from the Blocks palette to open its blocks.
                     Step 23  Drag the call Canvas1.Clear block and place it inside the when Button4.Click block.

                     Step 24  Click on the Canvas1 block from the Blocks palette to open its blocks.

                     Step 25  Drag the block when Canvas1.Dragged to the workspace.
                     Step 26   Drag the call Canvas1.DrawLine block and place it inside the when Canvas1.Dragged

                               block.
                     Step 27   Hover the mouse over prevX, select get prevX and connect it to x1 in the DrawLine
                               block.

                     Step 28  Hover the mouse over prevY, select get prevY and connect it to y1.

                     Step 29  Hover the mouse over currentX, select get currentX and connect it to x2.
                     Step 30  Hover the mouse over currentY, select get currentY and connect it to y2.

                                                                                              Touch to Motion with MIT  61

| 58 59 60 61 62 63 64 65 66 67 68 |