A (175)

(Tuis.) #1
CHAPTER 9: Android Graphic Design: Making Your UI Designs Visual 309

Other selection tools contain complex algorithms which can look at color changes between pixels,
which can be very useful for edge detection, which you can use in other types of selection work
processes. The edge detection selection tool will allow you to drag your cursor along the edge of
the object which you wish to mask, while the edge detecting selection tool’s algorithm lays down a
precise, pixel-perfect placement of your selection edge, ultimately creating or “pulling” that object’s
mask for you.


Smoothing Edges: The Concept of Anti-Aliasing


Anti-aliasing is an imaging technique usually implemented using an algorithm where two adjacent
colors in an image, which are on an edge between two color areas, are blended together along that
edge. This will make that edge appear to be smoother when the image is zoomed out; that is, when
the pixels are not individually visible.


What anti-aliasing does is it tricks your eyes into seeing a smoother edge, to eliminate what is
commonly called “the jaggies.” Anti-aliasing provides impressive results, by using only a few (usually
seven or eight) averaged color values of the pixels which lie along the edge that needs to be made
smoother. By averaged, I mean some color or spectrum of colors that are part of the way between
two colors that are intersecting at the jagged edge in an image.


I created a basic example of anti-aliasing to show visually what I mean. In Figure 9-1, you will see
that I created a (seemingly) smooth red circle against a yellow background. I zoomed into the edge
of that circle, and grabbed a screenshot. I placed this alongside of the zoomed-out circle to show
the anti-aliasing (orange) values of a color between (that is, made using) the red and yellow color
values that border each other along the edge of the circle. If you are looking at black and white, you
will see all of this in grayscale!


Figure 9-1. A red circle on a yellow background (left) and a zoomed-in view (right) showing the anti-aliasing

Free download pdf