Is there a better way of drawing a border inside a vector object other than drawing one vector shape on top of another and then resizing (as in my example image below)? I'd prefer to set it on the actual main object itself so when I resize it retains the correct spacing etc.
There are a few ways to achieve this, but the simplest way is usually the best:
- Draw your background rectangle.
- Draw your "border" rectangle.
- "Group" the two rectangles and they will resize together.
I've got a sort of cheat for doing this. You can have it all on one object, you just set two strokes in the Appearance menu (Illustrator). The first one is your dashed line, set it to Inside and let it extend to, let's say, 6px. Then, make the second one, set it to Inside and make it a pixel or two thinner. Apply the fill colour of the rectangle to it and put it on top of the first one. And that's it! You can resize is as much as you want. It can also be any shape, even a custom one. Hope this helps (: