Showing posts with label round corners. Show all posts
Showing posts with label round corners. Show all posts

TECHNIQUE: Pick a Corner... Any Corner.

In a recent post, I answered a reader's question about rounding some of the corners of a rectangle. Although the rectangle in the original question wasn't really a rectangle at all -- it was a dynamic button that was created from live text.

At the end of the post, I asked other readers to share their own ideas about to go about rounding off specific corners of an object. There were some interesting answers, including a link to a script, which was nice. Good work all around -- it's always good to get the creative juices flowing, and in the future, I hope to challenge more of you with other "projects" to participate in.

One of the things we learn about with Illustrator (more so than just about any other program), is that there are always a variety of ways to get any design task done. Some are more efficient than others. Some are easier to implement. Each offer pros and cons and each offer benefits for certain design tasks. With that in mind, I offer my solution for creating rectangles with a rounded corner (or three) of your choice...

As an example, here's a rectangle that has rounded corners on two opposite sides:



The way I did this was by creating a normal rectangle and using the normal Round Corners effect (under the Effect > Stylize menu). I then added an additional fill, which didn't have rounded corners. With the second fill targeted, I applied a Transform effect that applied a 50% scale to the fill and I instructed the Transform to be applied from a specific origin point -- a corner of my choice. This action effectively "covered up" the rounded corner with a square corner. Had I expanded the shapes, the result would look like this:



The key here is in the Transform effect. Let's see how I did this, step-by-step:

1. Draw a rectangle. Apply a fill and remove the stroke.

2. Choose Effect > Stylize > Round Corners and apply the effect.

3. Via the Appearance panel fly-out menu, add a new fill.

4. With the new fill targeted, choose Effect > Distort & Transform > Transform. In the Scale section, set both the Horizontal and Vertical values to 50%. Now for the most important part -- using the 9-point proxy, select one of the 4 corners to apply the scale from. The corner you choose will NOT have a rounded corner. Click OK to apply the effect.



5. Duplicate the fill and double-click the Transform effect in that fill. Change the origin point in that fill to specify another corner that should have a square corner. Repeat to add a third fill if you'd like. Your Appearance panel should look something like this:



Naturally, you could save this as a Graphic Style so that you could apply this with a single click. You might even create an entire library of styles that stored different corners of an object as being rounded, for any design task. Of course, these are all graphic styles with multiple fills and effects. And sometimes you need just a single plain flat object with a rounded corner. You could of course draw your rectangle, quickly apply a style, expand the appearance, and then use Pathfinder to create a single final shape. I know -- that's a lot of clicks. So having an action that would do all this for you with a simple keyboard shortcut would probably be better.

In fact, being that the holidays are upon us, I've decided to give all of my dedicated readers a gift. Two actually.

The first is a Graphic Style library that you can download. This library contains a plethora of styles with different round corner effects. All you need to do is load the style library and you're good to go. One click will give you the rounded corner(s) of your choice. Feel free to adjust the parameters as you see fit. I used a rather large round corner setting, mainly so the preview in the Graphic Styles panel clearly shows each effect.



The second is an Action that expands and combines the effect, leaving you with a flattened object. Once you load the Action, you can use the keyboard shortcut which I've assigned (Command-Shift-F12) or you can apply your own.

- Rounded Corner Graphic Style Library
- Expand and Combine Action

BTW, you can also copy and paste any of these shapes into InDesign if you'd like.

Hanukkah begins this week, and here in NY, we got a taste of winter with a bit of snow today. No matter what holiday you observe, I wish you and your loved ones only the most joyous and happiest of times. Maybe you'll be lucky enough to take a few moments to actually walk AWAY from the computer and enjoy all that life offers. I hope to do just that.

ASK MORDY: Rounding SOME Corners

nanimoshiranai offered this comment on a recent post:

I created now a style with rounded rectangular shape, another one with (only) rectangular form.
Question that arises afterwards: can I create in the same manner a style that has on the left hand corners rounded, but on the right hand side normal rectangular corners? (And vice versa, in order to quickly build a menu bar as on the apple.com website...)


Nanimoshiranai is referring to this post where I linked to a video podcast tutorial I did for Terry White's Creative Suite Podcast. The podcast offered a technique to create dynamically resizable buttons to match the look and feel of Apple's "Leopard" look. The whole original idea came from a tutorial that Veerle posted on her blog.

The result of the tutorial ended up looking something like this:



With the added benefit that the whole thing was a Graphic Style and that NO OBJECTS WERE DRAWN. The button was actually just some text typed on the screen. As you typed the text, the shape of the entire button simply resized itself to match the text.

But the question is actually a really good one. I imagine that what you're looking to do is something along the lines of this:



And yes, what you see in the screenshot above is actually created in the very same way -- although they are now three separate styles. One style has rounded corners just on the left side of an object, one has no rounded corner effect at all, and one has rounded corners only on the right side.

In fact, I can't even begin to tell you how often I hear requests from folks who want to round only SOME of the corners of an object in Illustrator (I can hear those FreeHand users giggling because FreeHand can do that). This requests comes from many web designers who are looking to create tabs or buttons that are rounded at the top of an object but that are squared off at the bottom.

So how did I do it? Simple. Let me show you with a regular rectangle -- then you can figure out how to simulate the effect for the Leopard buttons... I simply used TWO fills -- one fill that had a rounded corner effect applied, and one without. Then I used the Transform effect to offset the fills slightly so that rounded corners were only visible on one side (or just on the top or bottom). Like this:



Here are the steps to do this yourself:

1. Draw a rectangle. Fill it with your favorite color.

2. Use the Appearance panel to add a new fill.

3. With the new fill targeted, choose Effect > Stylize > Round Corners. Do your thing and give yourself some nice rounded corners (if you're working with text as in the leopard button example, you'll use the Effect > Convert to Shape > Rounded Rectangle option instead of course).

4. With that fill still targeted, choose Effect > Distort & Transform > Transform. Under the Move section, adjust your fill slightly so that it's offset from the original fill (you'd use horizontal movements to add rounded corners to the left or right, and you'd make vertical ones to add rounded corners to the top or bottom).

If you wanted everything to be centered, you'd apply a Transform effect to another fill (without rounded corners) with the exact opposite settings.

You like? Yeah, I kinda thought you would...

OK, so all you FreeHanders are still snickering because FreeHand can round just ONE corner, or opposite corners. Well, I have news for you -- I can use the same technique I just employed to do just that -- round ANY specific corner, some, or all. And of course, once it's a style, it's one click to apply it.

Pop quiz, Hotshot. The question you have to ask yourself is, can you figure it out on your own before I post the answer sometime over the weekend? Oooooh, a challenge! What do you do? WHAT DO YOU DO?

(sorry for the dialog stolen from the movie Speed).
Blogger Tips and TricksLatest Tips And TricksBlogger Tricks