[solved] alignment of layers

Post questions on how to use or achieve an effect in Inkscape.
User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

[solved] alignment of layers

Postby brynn » Mon Jun 02, 2008 9:58 pm

Oh my! I think I've been working on this for too long, because I can't even make sense of this problem, how it could be even possible that it's happening :lol: So I'm hoping you can help me yet again. I can post a sample image, if you need it, although you may have to describe what you need, if so.

I'm working on an image, which has 6 layers, at the moment. I'm just trying to get a good feel for layers, at this point. What I'm trying to do can probably be done with far less. Anyway, it's basically one object with a solid fill as the base layer (Layer 1), and the additional layers are various shadings and highlights. After I finish a layer, I've been duplicating it, moving it up to the next layer, and then creating in the new layer, whatever gradient I need to represent either shading or highlighting. I haven't been moving them at all, just letting them stack up, presumably right on top of each other, so that all layers should have the exact same size and the exact same X and Y values. At least I would expect them to.

I got up to Layer 5, and it took a bit of undoing and starting over, because I haven't really got the process of adding new gradients, duplicating them, editing, or whatever the case may be. So Layer 5 didn't go as smoothly as 1 through 4 did....which I mention because it's possible I could have moved it inadvertently. I thought I noticed it was shifted a bit off the stack of layers, but I wasn't sure, I thought it could have been sort of an optical illusion with the gradients. (I have some vision problems.) So I went on to Layer 6, dupulicated it, and began to work on the gradient for that layer. But when I was almost finished, I saw that it is definitely not aligned vertically with all the other layers.

One by one, I disabled the visibility of each layer. Then I noted the exact X and Y value for the base layer, Layer 1. With each layer being a duplicate of the one before, they should be, by definition, the exact same size, and on the exact same space on the canvas. Then one by one, I enabled the layers, checking on the X and Y values. And indeed, I found that Layer 5 is slightly out of vertical alignment, and Layer 6 is quite noticeably out of place.

But here's the weird thing. If I use the X and Y values' increase and decrease arrows, where I've found I can nudge an object into the position I want, and I get it lined up as perfectly as I can get it, the resulting X and Y values are WAY different than the other layers. And if I enter the X and Y values that Layers 1 - 4 share, Layers 5 and 6 are shifted out of place!

So it seems that when I 1st noticed they were not lined up vertically, they DID have the same X and Y values as all the other layers. Yet looking at the object with all its layers visible, clearly 5 and 6 aren't aligned with the others. :shock: It's too weird! How can the numbers possibly be different from the other layers, even though they are lined up almost perfectly??? The numbers should be off by very little, if any. And conversely, how can I set all the layers with the same X and Y values, yet 2 of them LOOK like they're not on top of the others???

It's almost as if the canvas has shifted by itself, leaving the image/layers behind! :? Or as if the out-of-sync layers had been skewed or scaled, although I have not used either transform on this object.

Now I KNOW that there is some distortion of grids and guides. They usually look like they aren't in the position that their number values indicate they should be. But I didn't think this problem should apply to images? It shouldn't, should it?

And I also know about snapping, to get things into alignment. But in this case, I don't really need it, and don't see any benefit to using it....although, it may be of use diagnostically, if nothing else, to prove they are lined up perfectly.

What in the world could be happening???
And again, please let me know if you need sample images and/or screen captures.
Thank you very much for your ever-dependable and most excellent help, advice and support :D

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: alignment of layers

Postby microUgly » Tue Jun 03, 2008 7:36 am

I think I understand what you are describing, but can't explain why. I think I would have to see the SVG myself to have any chance of explaining what is happening.

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

Re: alignment of layers

Postby brynn » Wed Jun 04, 2008 6:02 pm

How do I get the .svg to you?
I haven't found a suitable (for me) host for .svg, and I don't think a .svg can be inserted into a message in this forum, can it?

Also, I'll probably want to show you just the portion of the image I'm working on, so I want to be sure -- duplicate is the proper way to do it, correct? Can I duplicate it, then drag it into a new window? That should work?

What about PMs? Can files be attached to PMs in this forum? I'll look after I post this.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: alignment of layers

Postby microUgly » Wed Jun 04, 2008 6:22 pm

Where can I upload my images?

You can display SVG in the forum using the svg bbcode, or you can just post the URL.

I prefer not to use PM since it means others cannot help.

It's up to you how your arrange your file. You can always copy the file and strip out the unwanted details (as opposed to copying objects between Inkscape drawings).

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

Re: alignment of layers

Postby brynn » Thu Jun 05, 2008 3:09 am


Yes, I had read this topic a few times before. But the petaIMG site has been added since the last time I read it. So I think I have a sample .svg image, with layers preserved. I think!

I can't see it, because my browser doesn't display .svg. I guess I need to get the Adobe add-on. But it should be there, if you have the right software.

SVG Image

So if you look closely at the apex of the cone, you can see that the top layer (Layer 6) is the culprit. Layer 5 is also off a bit, but 6 is more obvious.

Can you determine what might be wrong?
Thanks for your help :D

[Edit] I just posted another topic, which may or may not be related to this one. FYI, it's here.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: alignment of layers

Postby microUgly » Thu Jun 05, 2008 8:50 am

for those with SVG capable browsers, brynn' image appears to not display because the canvas area is empty. The url for the svg is http://www.petaimg.com/uploads/1212608599.svg and you'll find the image easy enough in Inkscape.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: alignment of layers

Postby microUgly » Thu Jun 05, 2008 8:58 am

The object on layer "6" has been flipped vertically to the object on layer "Layer 1". The object is not perfectly symetrical so when you flipped it, the paths don't line up. The object is still the exact same size wich is why all the numbers for both objects are the same.

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

Re: alignment of layers

Postby brynn » Thu Jun 05, 2008 7:51 pm

Oooooooooohhhh!!
Ok, that makes sense.

Btw, what did I do wrong in inserting the image into the previous message? Did it not display?

User avatar
sas
Posts: 404
Joined: Sat Oct 06, 2007 5:42 am

Re: alignment of layers

Postby sas » Thu Jun 05, 2008 10:31 pm

brynn wrote:Btw, what did I do wrong in inserting the image into the previous message? Did it not display?

You inserted it correctly, but it doesn't display because there's a problem with the image itself. If you turn on the "Show page border" option in Document Preferences, you'll see what the problem is: the image isn't on the page (it's way up above the page).

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

Re: alignment of layers

Postby brynn » Fri Jun 06, 2008 1:26 am

Whoa!
Why is there so much extra room around the page border then? Why isn't the page border anywhere close to the edges of the canvas? Let me guess -- that's just the way it is?

Yeah, normally when I prepare an image for uploading to a host, I paste it into a new window, and automatically, it's pasted in the center. But this is the 1st time I've used an actual .svg in a message. And if I copied it and pasted into a new window, as I usually do, it lost the layer info, which was at the heart of my problem. So I copied the entire file, then deleted everything else around it. I just had no idea that Page Border was anything more than an annoyance. (The 1st thing I do when I start a new Inkscape window is disable the border and its shadow!)

Ok! So lesson learned :D
Thanks microUgly and sas. You're the best!

User avatar
sas
Posts: 404
Joined: Sat Oct 06, 2007 5:42 am

Re: alignment of layers

Postby sas » Fri Jun 06, 2008 2:35 am

brynn wrote:Why is there so much extra room around the page border then? Why isn't the page border anywhere close to the edges of the canvas?

Because it's more flexible the way it is. Forcing the user to work entirely within (or close to) the page would be quite restrictive. For example, it can be convenient to keep various bits and pieces outside the page, and only move them into position on the page when you're ready. Or if you're not aiming for a particular page size, you can just ignore the page borders while you're drawing the image, and click the "Fit page to selection" button in Document Properties when you're done.


Return to “Help with using Inkscape”