1

Is there a way to scale the combined size of the fill and the stroke to certain dimensions without affecting the thickness of the stroke?

enter image description here

4 Answers 4

1

Actually there is a way to make Illustrator include the stroke in the bounding box.

Open Edit > Preferences > General (Ctrl /Cmd + K) and tick on Use Preview Bounds.

Now the size of the object can be set including the stroke.

But, it seems to behave a bit strangely. If I change the dimensions using the mouse while holding down Shift it seems to constrain proportions like expected, but if I enter a dimension, the object doesn't constrain proportions properly. This seems like a bug or perhaps I misunderstand something.

For that reason I prefer leaving Use Preview Bounds unchecked and subtract the stroke width manually like @Scott suggests.

Funny thing is that InDesign by default includes the stroke width in the bounding box and doesn't seem to have an option to change it. But in InDesign there is no problem with constraining proportions when entering values for the dimensions.

1

Subtract the stroke width from your desired measurement.

So 500px - 15px = enlarge to 485px with the 15px stroke, the final dimension would be 500px (assuming stroke is aligned to center).

The bigger issue may be that scaling is always relative and never absolute. You can alter an object's dimensions easily (Via the Transform Panel or Control bar), but you can only scale by percentages.

As @Joojaa points out in comments the value fields will do the math for you. So, you can merely enter 500px-15px in the w field and AI will calculate that for you.

3
  • Thanks a lot, thought about subtracting myself, but it seems to complex for a simple task. But nevertheless, thank you for your answer!
    – Lex
    Apr 2, 2022 at 14:08
  • @Lex, Hard to imagine it being much simpler. You can even do the subtraction directly in the Transform panel.
    – Wolff
    Apr 2, 2022 at 14:51
  • @Lex you probably arent aware of this but many design software allow you to type the calculation into the input boxes. It even does unit conversions for you so you can go 10 mm - 0.1inch and it calculates for you. See computers are calculators.
    – joojaa
    Apr 2, 2022 at 15:02
0

Well, there's an option you have to check. Go to the Edit > preferences > General or just hit the shortcut, Ctrl + K.

Then find the option which says, Scale Stroke and Effects and just check the box.

Now every time you scale an object, the stroke and the effects will also change with it. (See the below two images for reference.)

enter image description here enter image description here enter image description here

1
  • This has basically already been answered, although you explain in more detail. I don't think this is what the OP means though. But we'll see what the OP says if they ever come back.
    – Wolff
    May 17, 2022 at 15:37
-1

Preferences > General > Uncheck Stroke and Effects

One way is to keep the stroke aligned inside of the object and scale through transform panel.

If align to inside provides a shape that is not required then, it is difficult to create a generic scenario that could be work for anyone, I have two ideas that can be used individually or mixed and match as required.

Manually resize the object considering that the final size of the object depends on the stroke alignment.

1) Aligned Center: Stroke Size would be added.
2) Aligned Inside: Twice the Stroke Size would be reduced.
3) Aligned Outside: Twice the Stroke Size would be added.

Use Path Offet.

1) Scale the Object to the desired size - stroke size.
2) Effects > Path > Offset Path
2) Add the Path Size
3) Object > Expand Appearance.

If none of the above works, then I would need sample files to create a script.

2
  • Why downvotes? Read the Question again and that's a reasonable answer. Did you guys actually try it? May 17, 2022 at 10:04
  • The OP wants to scale an object to certain dimensions including the stroke width. See the OP's drawings. Your solution makes sure the stroke isn't scaled but it doesn't help to get exact dimensions. After scaling the stroke width will make the object larger than what you enter in the transform field.
    – Wolff
    May 17, 2022 at 12:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.