Designing bitmapped graphics
User interfaces and games can be made much more interesting using color graphics. The GLCD library includes a function called GLCD_DrawBitmap()
that can be used to render 16-bit color bitmaps. Bitmaps can be designed using standard editors or downloaded from elsewhere. The following recipe shows you how to generate a simple bitmapped representation of a ball that can be used with the helloBounce and helloPong recipes we developed in Chapter 2, C Language Programming. We'll call this recipe bitmapBounce_c6v0
.
How to do it…
To design bitmapped graphics, follow these instructions:
- Create a color bitmap of width 16 pixels and height 24 pixels using the Windows Paint application. A screenshot of what this should look like ...
Get ARM® Cortex® M4 Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.