smashing-ebook-8

(Grace) #1

The result is perfect roundrects, every time. The only downside is that the
corner radius can’t be altered during or after drawing the shape. If you
need a different radius, you’re forced to draw it again. It’s a shame the
roundrect tool isn’t like Illustrator in this regard, where the up and down
arrow keys increase and decrease the corner radius while drawing.


On the positive side, keeping your objects as vectors means that you’ll be
able to resize the document and the corners will take full advantage of any
extra resolution. There is one small caveat though: if you resize, you’ll have
to do it as an exact multiple, or risk fuzzy non-pixel–locked edges.


If you’re being pedantic about the results, you may notice that the
antialiasing on the first half of each corner doesn’t match the second half —
you’ll have to look carefully to notice, though. For example, looking at the
zoomed corner below, the start of the corner to the apex isn’t identical to
the apex to the end of the corner (starting from either side). In practice,
that probably won’t create any issues.


2. Blur


The blur method is a bit of a hack that involves creating a selection,
blurring it, then increasing the contrast so that you’re left with a sharp mask
that’s antialiased nicely.

Free download pdf