Advanced 2D Rendering

Being able to draw more complex primitives or use a composition of them is critical to making the user experience of our custom view awesome, useful, and special. So far, we've been using some drawing and rendering operations on our custom view, but if we check the Android documentation closely, that's a much reduced set of what Android provides to developers. We have drawn some primitives, saved and restored our canvas state, and applied some clipping operations, but that's only the top thin layer. In this chapter, we'll see these operations again, but we'll also see few new drawing operations and how we can use everything together. We'll cover the following topics in more detail: