web analytics
July 9, 2015

Display – Introduction

display_intro

The library includes a display library that can perform the drawing of shapes, images and text. When drawing menus, displaying diagrams and showing numbers live on the screen, this part of the library is used. A reference for all the functions discussed on the following pages can be found here.

Before your sketch runs, the screen has already been initialized for you and filled with a black color. Draw operations that follow will stack, that is, draw on top of what was drawn previously.

Coordinate system

To address pixels on the screen, a coordinate system is used. With a screen resolution of 320 x 240, the top-left pixel is at (x=0, y=0), the bottom-right at (x=319, y=239). When positioning objects on the screen, imagine the position in a left-to-right and top-to-bottom way. To move it down a little, increase the y-coordinate. To move it to the right, increase the x-coordinate.



Next up: Touchscreen