1 / 7

MIT App Inventor

MIT App Inventor. Lesson 4 – Drawing on a Canvas. Agenda. Drawing on a Canvas Events Touched Dragged Algorithms Increment / decrement. Canvas. Grid for animation and graphics Uses (x,y) coordinates to locate objects. (0,0). (300,0). (0,400). (300,400). Canvas components.

Download Presentation

MIT App Inventor

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MIT App Inventor Lesson 4 – Drawing on a Canvas

  2. Agenda • Drawing on a Canvas • Events • Touched • Dragged • Algorithms • Increment / decrement

  3. Canvas • Grid for animation and graphics • Uses (x,y) coordinates to locate objects (0,0) (300,0) (0,400) (300,400)

  4. Canvas components • coordinates provided to event handler • In this case the action is to Draw a Circle on the same canvas • can have multiple canvas objects

  5. Controlling Objects • A separate canvas and sprite can be used as a game controller. • The value of draggedSprite is True when the sprite is being dragged

  6. Algorithms Patterns Increment • Increase the value stored in a variable Decrement • Decrease the value stored in a variable

  7. Lab 5 – Paint the Puppy ObjectiveCreate an interactive drawing program. • Components • Canvas • Concepts • Responding to user input • Touched • Dragged • Algorithms • Increment / Decrement of variables

More Related