Putting it all together
So far, we've seen many different drawing primitives, clipping operations, and matrix transformations, but the most interesting part is when we combine it all together. In order to build great custom views, we've to use many different kinds of operations and transformations.
However, having so many operations available is a double-edged sword. We have to be careful when adding this complexity to our custom view, as we can compromise performance quite easily. We should check if we're applying, for example, too many or unnecessary clippings operations or if we aren’t optimizing enough or we aren’t maximizing reuse of clipping and transformation operations. In that case, we might even use the quickReject() method from ...
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