Chapter 7. Pixels and the graphscreen

 

This chapter covers

  • Understanding the pixel coordinate system and the graphscreen
  • Reading and writing pixel values and drawing text
  • Testing your skills with a mouse cursor routine and a paint program

Say that with your newfound knowledge of getKey and event loops, you want to challenge yourself, and you decide to be ambitious. You want to move a mouselike cursor around your calculator’s screen. You let your imagination run free, and you envision something like the left side of figure 7.1. Perhaps you keep brainstorming and want to be able to doodle on the calculator’s LCD, so that you can draw things like the right side of figure 7.1. But you don’t yet know how to manipulate individual pixels. What you do know is how to draw characters on the homescreen, but that won’t help you write these programs.

Figure 7.1. Moving a mouse around the graphscreen (left) and using a painting program to doodle (right)

7.1. Introducing the graphscreen

 
 
 
 

7.2. Drawing text: first steps on the graphscreen

 

7.3. Playing with pixels

 

7.4. A painting program

 
 

7.5. Summary

 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest