Android Programming: The Big Nerd Ranch Guide, 5th Edition
by Bryan Sills, Brian Gardner, Kristin Marsicano, Chris Stewart
Images
Coda Pizza offers 4,096 combinations of toppings for your users to select. Creating a preview image for each combination is not feasible, so you will need to generate the preview for the user’s pizza on the fly. You will do this by combining several images, layering them on top of each other to get the final result.
The preview will start with an image of a plain cheese pizza. For each topping the user adds, you will overlay an image of that topping on the base image. If a topping is only on half of the pizza, you will crop the image so that it only appears on the correct half.
Start by importing the images you will use to build your pizza previews. If you do not already have them, download the solutions to the exercises in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access