Homework‎ > ‎

Paint Pot

--Using the Paint Pot tutorial, we incorporated several new aspects of the App Inventor which allowed us to use different "paint" functions on a Canvas component. In other words, the user can touch the screen to paint dots or lines on a selected image.One key concept illustrated in the tutorial was the event handler which is responsible for the ability to paint. Specifically the Canvas.Touched event handler would react to the users touch, creating paint. The event handler uses a set of arguments to react to the touch event. Two of the arguments, x and y locate the touch on the canvas. A similar event, Canvas.Dragged, was responsible for the paint lines. It used the arguments prevX, prevY, currentX, and currentY to analyze the coordinates of the drawn line.
--The second key concept of the tutorial was the global variable which could change the size of the dots drawn. We used three different variables to set dot sizes. The big variable was used for the big dot and the small variable for the small dot. The dotsize variable stores the size of the current dot. This allows us to set values for the different dot sizes and then place them in the blocks for the dot buttons.
global variable


Comments