Now that we are familiar with resource management, we can get on to the more interesting task of showing a picture on the display.
Marmalade spoils us by providing several different ways in which we can draw graphics on the screen. The following sections provide an overview of the different options available to us.
The lowest level of display access is the
s3eSurface
API. This provides access to the display by using a memory pointer that you can then use to directly read or alter pixels.
You can discover the width and height of the display in pixels and also the pitch, which is the number of bytes that you need to skip through memory to get to the next row of the display image.
The pitch is affected by the pixel format of the display (16-, 24-, or 32-bit displays are all possible) and often extra padding bytes are also added to allow each row to begin on a word-aligned memory address, which can improve display memory access times...