Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2. Paint Pot We will build the Paint Pot app in class. Notes regarding the screen/user interface: 1.7 buttons and a canvas 2.The canvas has a picture.

Similar presentations


Presentation on theme: "Chapter 2. Paint Pot We will build the Paint Pot app in class. Notes regarding the screen/user interface: 1.7 buttons and a canvas 2.The canvas has a picture."— Presentation transcript:

1 Chapter 2. Paint Pot We will build the Paint Pot app in class. Notes regarding the screen/user interface: 1.7 buttons and a canvas 2.The canvas has a picture (initially of a kitten) but we allow the user to replace that with a picture taken by the camera 3.The user can draw lines by dragging a finger on the screen 4.The user can make dots by touching the screen 5.Buttons allow the user to select small or large dots 6.The user can wipe the picture clean (remove dots and lines)

2 Chapter 2. Paint Pot App behaviour for 7 buttons 1.Red button clicked - The colour used for drawing becomes red 2.Green button clicked -The colour used for drawing becomes red 3.Blue button clicked - The colour used for drawing becomes red 4.Take Picture button clicked – The camera is used to take a picture 5.Wipe button clicked – all lines and dots are removed 6.Big Dots button clicked – the size of dots is set to a large size 7.Small Dots button clicked – the size of dots is set to a small size

3 Chapter 2. Paint Pot App behaviour for the canvas 1.User touches the screen – a dot is drawn at that position 2.User drags finger across screen – a line is drawn between the start and end positions

4 Chapter 2. Paint Pot What additional components are needed ? 1.Camera – in order to take a picture 2.Horizontal arrangements (x 2)

5 Chapter 2. Paint Pot Optional: David Wolber’s youtube videos &list=PLCF2969C390CE87F4

6 Chapter 2. Paint Pot Paint Pot demonstrates 1.drawing on the canvas component 2.calling procedures with arguments … the call statement 3.a variable Giving it a name … dotSize Initializing the variable … def statement Assigning the variable a new value … set statement 4.event handlers for button and screen events Button is clicked Canvas is touched Canvas is dragged Camera after picture is taken


Download ppt "Chapter 2. Paint Pot We will build the Paint Pot app in class. Notes regarding the screen/user interface: 1.7 buttons and a canvas 2.The canvas has a picture."

Similar presentations


Ads by Google