Alignation of two different objects

Post questions on how to use or achieve an effect in Inkscape.
James Bond'iola
Posts: 5
Joined: Tue Mar 01, 2016 11:56 pm

Alignation of two different objects

Postby James Bond'iola » Wed Mar 02, 2016 1:55 am

Well, I'm new using Inkscape and I need to know how can I align the nodes of two differennt objects. I mean, I have a bit map and I need to aling it's center (the middle-bottom node) to a circle with another pic inside (the middle-top node). I don't know how to do this and I will accept any suggestion. Thanks for answer :D

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Alignation of two different objects

Postby brynn » Wed Mar 02, 2016 2:46 am

Is the first bitmap inside a rectangle? Did you add a 3rd node to the bottom side?

Set up snapping like below, and those 2 nodes should snap together.
Attachments
snap3.png
snap3.png (5.44 KiB) Viewed 1014 times

James Bond'iola
Posts: 5
Joined: Tue Mar 01, 2016 11:56 pm

Re: Alignation of two different objects

Postby James Bond'iola » Wed Mar 02, 2016 3:04 am

Well, I think I know what's the problem. This bitmap lacks nodes. How can I add nodes to it without covnerting it to a svg file? SOrry for all this mess

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Alignation of two different objects

Postby Lazur » Wed Mar 02, 2016 3:24 am

Hi. Svg-s can have raster images embedded, but that alone won't convert them to be paths with nodes.
You can set up a grid in the document's properties (Shift+Ctrl+D) on pixel distances and enable snapping to grid intersections,
AND if you scale your images to the same pixel grid -meaning the size at the top boxes show the same values as the image's original pixel size displayed at the bottom- you can move the objects as if they had nodes at the pixels.

Probably anti-aliasing will be the next issue when exporting your work, so align the export area/page borders to the pixel grid (default size is A4, which has uneven sizes in px).

James Bond'iola
Posts: 5
Joined: Tue Mar 01, 2016 11:56 pm

Re: Alignation of two different objects

Postby James Bond'iola » Wed Mar 02, 2016 3:43 am

That helped me much! I think I have to say what I did:

First I put the grid of 1px X 1px. Then I put the circle's top node in a specific "pixel". After that, I selected the pic and put its left-bottom corner in the same point. This is when it gets a bit accomplished: Using maths, I divided the image's weight by 2 (for example : 1000/2 = 500): Then using that number I checked its position in X axe (example: 1012) and subtracted the first result to it (1012-500 = 512). I changed its X position to that number and VOILÁ! It was centered (in bith X & Y axes). For avoiding any problem, I grouped those objects. If someone wants to do the same but wants to put it in other Y position, you ahve to just change the Y exe

Thank you so much for all the help (:>) And sorry id this is badly wrote, I speak spanish

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Alignation of two different objects

Postby brynn » Wed Mar 02, 2016 4:45 am

(This is one of many things in Inkscape, that can be done in a few different ways. Usually it comes down to personal preference. To my way of thinking, you probably want avoid scaling the raster image, which is part of Lazur's suggestion. But sometimes he's 5 or 6 steps ahead of me.)

This is how I would do it.

Use the rectangle tool, and make a rectangle the exact same size as the raster image. (I thought you already did this, because you said there was a node.) After it's the right size, do Path menu > Object to Path.

If the rectangle is filled with some color, click Object menu > Lower to Bottom. (This will make sure it's behind the raster image. Or you could remove the fill color and add a stroke, but that takes more words to explain.)

Switch to the Node tool, and click on the bottom side of the rectangle (this will select the 2 nodes in the bottom corners).

Click Add Nodes button once (first button on the left of Node tool control bar) (looks like Image) This places the new node precisely in the middle.

Select the raster image, and hold the Shift key while you click on the new rectangle. (This selects them both at the same time.)

Open Object menu > Align and Distribute.

Click "Center on vertical axis" button (looks like Image)
Click "Center on horizontal axis" button (looks like Image)
This aligns the rectangle and the raster image perfectly (assuming they are exactly the same size).

While they are both still selected, Object menu > Group. (This makes them behave as if the rectangle and the raster image are 1 single object -- they will move together at the same time.)

It sounds like you already have the other image inside a circle, which means there should be a node at the bottom. But maybe not. The technique for a circle MIGHT be a little different from the rectangle. So if you need help, let us know. If you need help, can you show a screenshot of the Inkscape canvas, with the imported raster images showing? I'm just curious if the image in the circle is already shaped like a circle, or if you still need to do that.

Now set up snapping like I explained, and it should work perfectly.

Let us know how it goes :D

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Alignation of two different objects

Postby brynn » Wed Mar 02, 2016 4:47 am

Never mind about the circle. I see you already got instructions for that here: viewtopic.php?f=5&t=23008

James Bond'iola
Posts: 5
Joined: Tue Mar 01, 2016 11:56 pm

Re: Alignation of two different objects

Postby James Bond'iola » Wed Mar 02, 2016 5:20 am

Ok, I completly messed up my mind, sorry. Yeah it worked perfectly, thank you so much.


Return to “Help with using Inkscape”