Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Sep 2007
    Location
    Manchester, UK
    Posts
    113

    Red face how can i align objects side-by-side with 0px gap

    hi
    i know this is a bit basic but i couldnt find anything that pinpoints my problem, usually if i want to align shapes side-by-side so that they have no gap between them, or 0px, i do it by cloning the shape and moving it along the direction its going and then zooming in on the gap. this is a 'by-eye', i'm sure theres a more definitive way to do it.

    for example, if i am joining two square shapes together, to make a rectangle, how can i make sure the join is seamless and perfect?

    thanks?
    'I'm comin to you now, I'm just around the corner!'
    Bespoke art and design by Herbie Hysteria. http://www.artbyherbie.com

  2. #2

    Default Re: how can i align objects side-by-side with 0px gap

    Hi herbie,

    To make the squares align, simply make your first square and left click it once. You’ll see small black square ‘handles’ appear around the square. Left click the centre left handle and while holding it down, push the ctrl button and then drag the handle to the right. As the square flips over, click your right button and let go. This will create a second square beside the first. Do the same with the second square to make three. Marquee select all three squares, click on the group, select the top centre black handle, hold ctrl down and drag towards the bottom, and when all three flip over right click your mouse and let go. You should now have six squares. Repeat to make nine. This operation takes about five seconds once you get the hang of it. I usually do this without lines on the rectangles.

    If they are two separate rectangles, you can use alt/arrow to pixel nudge them together. You might have to zoom in and look at it in wireframe mode to make sure it’s exact.

    *Edit - I forgot to mention guidelines and grids - probably because I never use them. With guidelines and grids enabled, you can snap the rectangles together.
    Last edited by James Allen; 22 January 2011 at 02:58 PM.
    Visiting/participating in TalkGraphics since i/us (’97).

  3. #3
    Join Date
    Sep 2007
    Location
    Manchester, UK
    Posts
    113

    Default Re: how can i align objects side-by-side with 0px gap

    thank you, great reply, just what i was looking for
    also, im the same, i dont use grids and guides, sometimes i think i should take the time out to get used to them but they've never really affected my work
    'I'm comin to you now, I'm just around the corner!'
    Bespoke art and design by Herbie Hysteria. http://www.artbyherbie.com

  4. #4
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,659

    Default Re: how can i align objects side-by-side with 0px gap

    If you don't want to twidle and zoom with the mouse, select the first object and look at it's position and width/height (top bar) and then select the second object and set the x and y position. It's simple maths.

  5. #5

    Default Re: how can i align objects side-by-side with 0px gap

    Another very easy way to do this is to set the Page Options so that duplicated objects are the correct distance--the dimension of the object. (this works horizontally, vertically, or diagonally!) Just set the Page Options and every press of Ctrl-Alt-D puts another copy in the exactly correct positioning.

    Peace

    James

  6. #6
    Join Date
    Sep 2007
    Location
    Manchester, UK
    Posts
    113

    Default Re: how can i align objects side-by-side with 0px gap

    thanks, ive mastered it!
    @pauland - 'simple maths' was never a strong-ponint for me
    'I'm comin to you now, I'm just around the corner!'
    Bespoke art and design by Herbie Hysteria. http://www.artbyherbie.com

  7. #7
    Join Date
    Jul 2017
    Location
    Dunedin, New Zealand
    Posts
    13

    Default Re: how can i align objects side-by-side with 0px gap

    Does that actually work?

    If I have a square with sides of 8cm and positioned at x=1cm, and then position a diplucate square at x=9cm, there is still the 1px gap in between. That suggests the original square was not exactly 8cm wide. Or, am I doing something wrong?

  8. #8
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,659

    Default Re: how can i align objects side-by-side with 0px gap

    Quote Originally Posted by PeterC View Post
    Does that actually work?

    If I have a square with sides of 8cm and positioned at x=1cm, and then position a duplicate square at x=9cm, there is still the 1px gap in between. That suggests the original square was not exactly 8cm wide. Or, am I doing something wrong?
    I'm intrigued by two things.

    First of all sizing things in Centimetres and then describing a gap in pixels. Sounds like a rounding issue to me. If you are working with digital media stick to pixels because otherwise it's not a fully accurate representation of a physical size. If you want to keep to real-world units, then the pixel rendering is always going to be subject to some rounding errors. The extend of the rounding errors depends on the precision of the maths and how many pixels represent a centimetre.

    I'm intrigued by a nine-year old thread bursting into life again!

  9. #9
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,659

    Default Re: how can i align objects side-by-side with 0px gap

    PeterC I would just like to add..

    It's understandable and completely normal that people use real-world units, but the conversion between the real world and the digital screen isn't going to be perfect. If the squares were being printed on a page I doubt a gap would be visible.

    If you are working on web pages then always use pixels and everything should align perfectly.

    Thanks for an interesting question.

    Paul

  10. #10
    Join Date
    Jul 2017
    Location
    Dunedin, New Zealand
    Posts
    13

    Default Re: how can i align objects side-by-side with 0px gap

    Hi Pauland. Thanks for responding.
    I mixed my units because, as I understand it, Xara leaves a 1 pixel gap between objects irrespective of the size, or units, of that object. It is that 1 pixel gap that is the problem and presumbly the reason for the original question.
    If I use "snap to objects", I get a gap between the two objects.
    If I use the "simple maths" method I get a gap between the objects (even when the units being used are pixels). If I have an 80x80 pixel square, duplicate it and positon the second one 80 pixels away, I get a gap.
    If I use the "drag-the-handles-and-flip" method, I get a gap.
    I know you can nudge the each time but that is an extra step if there is a method of having 0 pixels between.
    This is my experience but if I am doing something wrong, or there is another method that does allow aligning without the gap, I'd be really interested.

    Thanks very much,
    Peter

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •