© Andrés Colubri 2017

Andrés Colubri, Processing for Android, https://doi.org/10.1007/978-1-4842-2719-0_4

4. Drawing Graphics and Text

Andrés Colubri

(1)Broad Institute, Cambridge, Massachusetts, USA

In this chapter, we will delve deeper into the Processing API for drawing shapes, images, and text, using several code examples to illustrate the different functions in the API. We will also learn how to use the P2D renderer and the PShape class for better 2D performance.

Renderers in Processing

In the previous chapters, we learned the basic structure of a Processing sketch, which consists of a setup() and a draw() function, with the former containing the sketch initialization and the latter the code that updates the screen in each frame. As part of ...

Get Processing for Android: Create Mobile, Sensor-Aware, and VR Applications Using Processing now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.