[solved] snapping to gridlines (and rows/columns)

Post questions on how to use or achieve an effect in Inkscape.
Serendipity
Posts: 10
Joined: Thu Jul 10, 2008 1:32 am

[solved] snapping to gridlines (and rows/columns)

Postby Serendipity » Thu Jul 10, 2008 4:24 am

I'm creating a 17x17 crossword with 289 squares. per advice on this forum I am using the rows/columns feature.

1) in practising with this, when I create 9 boxes (duplicated right on top of each other), select all 9 and then set rows = 3 and columns = 3 it seems to override this with a 1x9 configuration. I got 3x3 to work once, but the rest of the time I just get a single row of 9 squares. I type in 3 in rows, I type in 3 in columns, then it gets overridden with 1 and 9.

2) I would like these to snap to the grid so they are perfectly aligned with each other. So I opened the document properties dialog, looked at all the options, set them as I thought I should, to snap to grid, selected a sensitivity, made the grid visible, and moved a square around. It did NOT snap to nearby gridlines no matter how closely I positioned it, or how generous I set the tolerances. But...it did snap to a guideline that was pretty far away. I was zoomed in very tight on the square, and it disappeared, and when I zoomed out, I saw it hugging a guideline far away!

User avatar
heathenx
Posts: 388
Joined: Thu Jun 07, 2007 11:51 pm
Location: USA
Contact:

Re: snapping to gridlines (and rows/columns)

Postby heathenx » Thu Jul 10, 2008 5:43 am

1) in practising with this, when I create 9 boxes (duplicated right on top of each other), select all 9 and then set rows = 3 and columns = 3 it seems to override this with a 1x9 configuration. I got 3x3 to work once, but the rest of the time I just get a single row of 9 squares. I type in 3 in rows, I type in 3 in columns, then it gets overridden with 1 and 9.


It's finicky. Instead of typing "1" type "0" to reset it.

2) I would like these to snap to the grid so they are perfectly aligned with each other. So I opened the document properties dialog, looked at all the options, set them as I thought I should, to snap to grid, selected a sensitivity, made the grid visible, and moved a square around. It did NOT snap to nearby gridlines no matter how closely I positioned it, or how generous I set the tolerances. But...it did snap to a guideline that was pretty far away. I was zoomed in very tight on the square, and it disappeared, and when I zoomed out, I saw it hugging a guideline far away!


Setting up a grid before you start drawing, though not the wrong approach, complicates things a bit. It isn't really necessary. I would use the create tiled clones or rows and columns with 2-3 px of gap in between. You might need more or less gap depending on what you really need.

Here are a couple of examples of a crossword style grid that I made. It has 289 squares with a 3 px space in between them. I put it on a black background. I added a layer with an image overlay that I grabbed from google. Also, I converted my first svg to guides for you on the second svg file.

crossword_hx.svg

crossword_guides_hx.svg

rfquerin
Posts: 18
Joined: Fri Jun 22, 2007 12:59 pm
Location: Beeton, Ontario, Canada
Contact:

Re: snapping to gridlines (and rows/columns)

Postby rfquerin » Thu Jul 10, 2008 5:57 am

Serendipity wrote: I would like these to snap to the grid so they are perfectly aligned with each other. So I opened the document properties dialog, looked at all the options, set them as I thought I should, to snap to grid, selected a sensitivity, made the grid visible, and moved a square around. It did NOT snap to nearby gridlines no matter how closely I positioned it, or how generous I set the tolerances.


You should make sure to uncheck 'snap to guides' if you don't want guide snapping, but also note that the snap distance for grid snapping is in 'screen pixels' so that means (I think) that it doesn't matter what zoom level you're at, it will always snap when you're that many screen pixels away. Hope that makes sense. I've found that setting a snap distance value of 8 or 9 works for most cases when I'm using grids and grid snapping.

As far as the rows and columns thing goes, I've not had a problem yet. I just click up the rows to 3 and the columns reduce to suit (if I've got 9 objects selected).

Also, I'm not sure if anyone's mentioned this (and not sure of your Inkscape prowess) but you should also make sure to hold the Ctrl-key down when you drag out to create the rectangle. This will ensure you get either a square or a rectangle in predefined ratios (1:1, 1:2, 1:3) etc.. It makes creating squares much less of a guessing game.

SureWhyNot
Posts: 137
Joined: Mon Jun 16, 2008 11:37 pm
Location: United States

Re: snapping to gridlines (and rows/columns)

Postby SureWhyNot » Thu Jul 10, 2008 6:10 am

The rows/columns is sorta messed up for me too. I found that if you use the up and down buttons in the dialogue, instead of typing in values, it usually works.

Serendipity
Posts: 10
Joined: Thu Jul 10, 2008 1:32 am

Re: snapping to gridlines (and rows/columns)

Postby Serendipity » Thu Jul 10, 2008 7:38 am

Thanks you guys! Heathenx, thanks for posting the two files. You actually gave me a good idea there...when I created my grid I used 1" squares that had black edges, and for some reason when they are snapped together on a 1"x1" grid there's the tiniest line between all the squares. When I hit [+] to zoom in, the line is still there. I don't know whether it would print out, but it bugs me.

I wonder whether, by creating a layer with a black box in it, then a layer above it, I can create 289 squares - spaced a bit apart - that "float" on top of it and get exactly the effect I want without the lines between the squares? I know somebody posted to a video that shows how you can do that (overlay a grid of rectangles on top of an image and have the image kind of float up through it.

I'm not sure I have the skills to execute that though! I think I would have to make the area around the squares transparent and I don't know how to do that...

[edited later]

actually, what worked really great was to create a square slightly larger than the crossword grid I wanted, and fill it in completely black. then, i created the individual squares I wanted, filled them with white and had no stroke fill at all. I cloned the first one 8 times, then made a 3x3 of it (the idea to click on the sizing worked great). I set some space between the squares. Then I grouped the 3x3, cloned it 8 times, and made a meta 3x3 (which was really 9x9). spaced that. Cloned it 3 times, and made an 18x18. Then I ungrouped it and got rid of one column and one row, and I had a 17x17 grid. I then laid it over the black box, and the gridlines I wanted showed through in the gaps between the boxes. This was all on the same layer, so I didn't have to have one layer "read" through to another. I don't know whether that would have been difficult or trivial, but when I first tried it, it didn't work.

Then I went in and ungrouped all 289 squares and individually filled the ones I wanted to be black. It looks great, and there aren't any of those little ghost lines between the cells as I had when I butted them up against each other.

I really like InkScape. I tend not to be very good at graphics programs, but with your help and some sniffing around on the internet and with the manual, so far I have been able to make it do what I want...and any problems I have are due most likely to (a) my not understanding the graphics environment in general and (b) my not being familiar with InkScape's features.

And it's free!!! I can't believe a program this good is freeware.


Return to “Help with using Inkscape”