Jump to content
You must now use your email address to sign in [click for more info] ×

Center within an object


Recommended Posts

Is there away to tell a rectangle (layer) to center itself within the rectangle (layer) behind it? 

Because I am Really bad at math - I've learned to use the transform option to place an object in a specific place, but to use it to mathematically center an object within another object is beyond my cognitive capability (:

 

Windows 10 | Affinity Designer/Photo/Publisher | Super Power: ADHD | Instagram - Twitter | Code: HTML, CSS, PHP, JavaScript, Node, Lua, Kodular,  Stencyl & Unreal

Link to comment
Share on other sites

Well, if you have Snapping enabled it's pretty easy to just use the Move tool and drag the inner one until Affinity tells you that it's centered via the green and red snapping guides.

But if you don't want to use Snapping, then with the Move tool:

  1. Click the outer rectangle;
  2. Shift-click the inner rectangle;
  3. Click the Arrange icon, and then align to middle both horizontally and vertically.

center.png.de47393b41126b8da4bb739c8aa0cb28.png

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 17.7, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.7

Link to comment
Share on other sites

You could also make use of the expand stroke feature by creating a rectangle with no fill and a stroke set to inner and the distance from the edge being the width of the stroke, you can also set the join to Mitre Join to get sharp corners, use Layer > Expand Stroke, then just click Geometry: Divide and this creates two rectangles, you can now add strokes and fills to suit.

You can do this with just about any shape.

iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.