FluorescentTurban Posted August 21, 2017 Share Posted August 21, 2017 Hi! This may be a silly question, but I often take a shape (rectangle usually), I copy and paste it to make a duplicate, and then make the duplicated shape smaller and inside the bigger object of the same shape. Then, I want the smaller shape to have the same size padding on all sides (top/bottom and left/right) which often means just ball parking and estimating it. If that doesn't make sense, in the attached image, I want the top and bottom of the smaller object to have the same amount of space as the left/right sides. Curious is there's an easy way to do this. Thanks! Quote Link to comment Share on other sites More sharing options...
toltec Posted August 21, 2017 Share Posted August 21, 2017 Only really by using the Transform panel and doing some calculations. i.e 20mm smaller both ways to get a 10mm gap all round. When you drag the inner box the auto alignment guides will help you centre it in the outer box, or you select both boxes and go Arrange > Align Centre then Arrange > Align Middle. Quote Windows PCs. Photo and Designer, latest non-beta versions. Link to comment Share on other sites More sharing options...
GDPR-354025 Posted August 21, 2017 Share Posted August 21, 2017 I realize this is a very old video, and it uses PhotoPlus, not Affinity. It was made by a very enthusiastic Serif forum member now deceased. I use his videos all the time to help me understand Affinity, and perhaps it might help you. (He was confined to a wheelchair and had severe mobility problems, and this explains his mildly unusual voice.) https://www.youtube.com/watch?v=7HjBFvn4x3E&list=PLFBF6BB4FE0F41131&index=14 Quote Link to comment Share on other sites More sharing options...
R C-R Posted August 21, 2017 Share Posted August 21, 2017 Expanding slightly on what toltec said, to make this as simple as possible, start by duplicating the first rectangle with a keyboard shortcut (CMD+j on a Mac & I think CTRL+j on Windows) instead of copying & pasting. Then, in the Transform panel click the chain link icon next to the w & h fields to disable proportional changes & click on the center anchor point. This lets Affinity do the math for you: enter w-(2*xx) in the w field & h-(2*xx) in the h field, replacing xx with the desired gap in the current document units. Your second rectangle will be perfectly centered with the desired gap all around the edges. The same technique can be used to make the duplicate larger by the desired gap by changing the subtractions to additions. toltec, Juan Francisco and A_B_C 2 1 Quote All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 Affinity Photo 1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7 Link to comment Share on other sites More sharing options...
gdenby Posted August 22, 2017 Share Posted August 22, 2017 Hi, FlourescentTurban Let me preface this by saying I've been up about 17 hours, my eyes are falling out of my head, and I'm not quite sure I even understand exactly what you are trying to do. Here's an image that is my guess about what you want. It can all be done via copy, group and scale with snapping turned on. No numeric entry. If its sort of what you want, I'll post in the morning w. something that is hopefully coherent. Nitey night. Quote iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb, AMD Radeon R9 M290 2048 Mb iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil Huion WH1409 tablet Link to comment Share on other sites More sharing options...
toltec Posted August 22, 2017 Share Posted August 22, 2017 1 hour ago, R C-R said: Expanding slightly on what toltec said, to make this as simple as possible, start by duplicating the first rectangle with a keyboard shortcut (CMD+j on a Mac & I think CTRL+j on Windows) instead of copying & pasting. Then, in the Transform panel click the chain link icon next to the w & h fields to disable proportional changes & click on the center anchor point. This lets Affinity do the math for you: enter w-(2*xx) in the w field & h-(2*xx) in the h field, replacing xx with the desired gap in the current document units. Your second rectangle will be perfectly centered with the desired gap all around the edges. The same technique can be used to make the duplicate larger by the desired gap by changing the subtractions to additions. Very clever. 5 star tip Ctrl J is correct. Quote Windows PCs. Photo and Designer, latest non-beta versions. Link to comment Share on other sites More sharing options...
gdenby Posted August 22, 2017 Share Posted August 22, 2017 Here's my offering. If I understand what FlourescentTurban wants, the procedure goes like this. There is an arbitrary sized rectangle. It is copied and scaled down around the center of the parent rectangle. There is then an apparent boundry "frame." The copy and scale is to be repated with the constraint that the bounrdry has the same proportions. When the boundry is created, if the horizontal and verticle lines of the smaller child rectangle are extended, there are 4 corner rectangles. As the next smaller rectangle is made, those corner rectangles will grow. So the corners of the main rectangles decrease along diagonals leading to the center scaling. The corner rectangles also increase along that diagonal, but their scaling centers are the outer corners of the parent rectangle. The size of the outer rectangle increase as they scale up is limited by diagonals drawn from their corners to the parent scaling center. Where those diagonals intersect the first child rectangle's horizontal and verticle edges is the bound of the next corner expansion. Draw a rectangle within those points. Make the next set of corners extend to where the corner diagonals intersect the 2nd rectangle periphery. Continue as desired. Hopefully, the illustration will make things more evident. The process I used needs a bit of refinement to be accurate, but I did a test by inserting the series of corner expansions on inside another, and visually at least, they seem to decrease in the same proportion as the main rectangles are. Quote iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb, AMD Radeon R9 M290 2048 Mb iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil Huion WH1409 tablet Link to comment Share on other sites More sharing options...
R C-R Posted August 22, 2017 Share Posted August 22, 2017 1 hour ago, gdenby said: There is an arbitrary sized rectangle. It is copied and scaled down around the center of the parent rectangle. There is then an apparent boundry "frame." The copy and scale is to be repated with the constraint that the bounrdry has the same proportions. If I understand what he wants correctly, it is not for the duplicate shape to be scaled proportionally but for it to be inset by an equal amount on all four sides so the "gap" (the apparent frame) between the two is a constant width. So for example, for a rectangle that is 20 units wide by 15 units high & a desired gap of 5 units, the second rectangle should be 10 units wide by 5 units high, with the same center as the outer one. The larger rectangle has proportions of 4:3, so if it was scaled down proportionally to 10 units wide, its height would be 7.5 units, not the desired 5 units. The proposed solutions using the Transform panel work fine for geometrically regular shapes like rectangles but for arbitrary irregular shapes I think only a dedicated inset tool would work, one that computed the normal to each node & moved them by equal amounts in the duplicate. Quote All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 Affinity Photo 1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7 Link to comment Share on other sites More sharing options...
A_B_C Posted August 22, 2017 Share Posted August 22, 2017 I think R C-R is right about the meaning of the original request. So why not use little squares in two opposite corners of the larger rectangle and snap the smaller one to these squares? (Okay, that doesn’t work with the bounding boxes of irregular shapes in general, but nonetheless …) Quote Link to comment Share on other sites More sharing options...
A_B_C Posted August 22, 2017 Share Posted August 22, 2017 Another way to do it: duplicate the original object, add a stroke to the duplicate of the desired width and use Layer > Expand Stroke. Then delete the undesired nodes from the result of expanding. Works with irregular shapes as well. Remember, Expand Stroke is currently reworked, so the results should get better soon. Quote Link to comment Share on other sites More sharing options...
toltec Posted August 22, 2017 Share Posted August 22, 2017 I tried R C-Rs little formula and it was incredibly quick and simple. At least for rectangles. I had a 80 x 80 mm rectangle, duplicated it and entered w-20 h-20 (in the appropriate W H boxes) and had a perfectly centred rectangle 60 x 60 mm. A 10 mm gap all round. Even if the document units are in inches or pixels, enter w-20 mm and it uses 20 millimetres. And vice versa. i.e. w-1 inch for a half inch all round border. Quote Windows PCs. Photo and Designer, latest non-beta versions. Link to comment Share on other sites More sharing options...
gdenby Posted August 22, 2017 Share Posted August 22, 2017 Yeah, seems I misunderstood the question. I see the request for "the same size padding." I was taking it as "the same (proportional) size padding" seeing that the width of the aqua shape was not an even offset. Quote iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb, AMD Radeon R9 M290 2048 Mb iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil Huion WH1409 tablet Link to comment Share on other sites More sharing options...
JimmyJack Posted August 22, 2017 Share Posted August 22, 2017 Another non transform panel/input solution.... as nice as that is. For a Rectangle: All you need is a 45º line. With snapping and CMD constrain, super simple. Readjustable on the fly. 1) Draw rectangle. Duplicate (CMD J). 2) Draw line. Snap to corner, drag while holding CMD (mac) to constrain to 45º. (Doesn't need to have a stroke (in fact it's better that way) 3) Resize the copy with CMD (mac) held down (snap to geometry needs to be on). If you're anywhere close to the line it'll snap all the way through the resize. Resut: Can be any size. Readjustable. MEB and A_B_C 2 Quote Link to comment Share on other sites More sharing options...
R C-R Posted August 22, 2017 Share Posted August 22, 2017 20 minutes ago, A_B_C said: I think R C-R is right about the meaning of the original request. So why not use little squares in two opposite corners of the larger rectangle and snap the smaller one to these squares? I like the methods using the Transform panel better because there is no need to create the two extra squares, make sure they are properly corner-aligned (which admittedly is usually not hard to do with snapping enabled), & then delete or hide them afterwards. There is also no need to make sure the appropriate snapping options are enabled, or even to make sure snapping is enabled (which may require another extra step), or to make sure the appropriate constraints are used to ensure the two little shapes are really square. It is also easy to change the gap later using the Transform panel with the same anchor point & unlocked chain link settings simply by entering w & h values using the appropriate formulas, like w-3 & h-3 or w+4 & h+4, respectively. Quote All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 Affinity Photo 1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7 Link to comment Share on other sites More sharing options...
A_B_C Posted August 22, 2017 Share Posted August 22, 2017 My intention was just to point to another option, really. (Maybe I am a little more visually oriented. When I am setting up a document with a custom bleed area, I will use such little measurement aids very often, trusting in the precision of Designer’s snapping algorithms. But of course, the Transform Panel method works nicely, and the option of entering formulas is certainly a great and useful feature.) R C-R 1 Quote Link to comment Share on other sites More sharing options...
FluorescentTurban Posted August 22, 2017 Author Share Posted August 22, 2017 I've never found a forum so full of helpful members who are willing to spend their time and wisdom helping others. This is a great resource, thanks so much guys! A_B_C 1 Quote Link to comment Share on other sites More sharing options...
gdenby Posted August 22, 2017 Share Posted August 22, 2017 I spent some more time w. doing it all by graphic manipulation, assuming the proportional resizing. I thought I had it last night, but it didn't look quite right. Upon looking closer this morning, it was just that my eyes were just not in focus, and the work was sloppy. Just draw the outer and inner rectangle. Group them. Create a diagonal into the center. W. snapping to object geometry on, select group, copy paste, resize constrained around the center till the copy outer edge meets the 1st inner edge. Repeat, somewhat tedious, but it forms a perspective recession. So either constant or proportional resizing is pretty easy. Now, how to do it with non-quadrilateral shapes... Quote iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb, AMD Radeon R9 M290 2048 Mb iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil Huion WH1409 tablet Link to comment Share on other sites More sharing options...
Guest Posted August 22, 2017 Share Posted August 22, 2017 Hi FluorescentTurban, If the result can be composed of a single shape, you can add to your large rectangle an fx "Outside" aligned "Inside" and for which you choose the color and adjust the thickness. If you want to keep both rectangles, this method will not do. Quote Link to comment Share on other sites More sharing options...
ShiggyDog Posted January 18, 2018 Share Posted January 18, 2018 On 8/22/2017 at 7:12 AM, R C-R said: If I understand what he wants correctly, it is not for the duplicate shape to be scaled proportionally but for it to be inset by an equal amount on all four sides so the "gap" (the apparent frame) between the two is a constant width. So for example, for a rectangle that is 20 units wide by 15 units high & a desired gap of 5 units, the second rectangle should be 10 units wide by 5 units high, with the same center as the outer one. The larger rectangle has proportions of 4:3, so if it was scaled down proportionally to 10 units wide, its height would be 7.5 units, not the desired 5 units. The proposed solutions using the Transform panel work fine for geometrically regular shapes like rectangles but for arbitrary irregular shapes I think only a dedicated inset tool would work, one that computed the normal to each node & moved them by equal amounts in the duplicate. Inkspace has an "inset" command.... Does Infinity Designer not have this ? Quote Link to comment Share on other sites More sharing options...
Staff MEB Posted January 18, 2018 Staff Share Posted January 18, 2018 Hi ShiggyDog, Welcome to Affinity Forums No, currently there's no equivalent in Affinity Designer. Quote A Guide to Learning Affinity Software Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.