Chapter 13. Working with the Canvas and Advanced Drawing
Now that you understand how to create completely custom views, it is helpful to understand some advanced drawing techniques. This chapter will show different methods of image compositing using a custom view as well as a method for using a custom Shader
to change the shape of an image by using a custom Drawable
. Both the image compositing techniques and the Shader
techniques can be used in your own views, Drawable
s, and even custom utility classes to achieve effects that aren’t readily supported by Android’s default classes.
PorterDuff Image Compositing
Behind the scenes, Android is using Skia, an excellent 2D C++ graphics library. Most of the drawing-related code you use in Android directly ...
Get Android™ User Interface Design: Turning Ideas and Sketches into Beautifully Designed Apps 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.