Paste, move colored squares - but keep them aligned to grid

Post questions on how to use or achieve an effect in Inkscape.
afarber
Posts: 5
Joined: Sun Mar 02, 2014 12:17 am
Location: Bochum, Germany

Paste, move colored squares - but keep them aligned to grid

Postby afarber » Sun Mar 02, 2014 12:24 am

Hello!

I am developing a word game for iOS and would like to use an SVG file as the gaming board.

The SVG file (attached; author: Denelson83, Wikimedia Commons) is almost perfect for my game - except for deplaced colored squares.

My question is:

How could I please copy such a colored square (is it a Group?), then paste it and move the new square to a new spot - but still keep it aligned to the grid?

In the Document Properties I have set the grid size (15 x 15) and offset:

Image

But while the grid looks ok now and snaps too - it snaps in the wrong places as shown below.

Image

Why doesn't the grid snap at the square's borders?

Thank you
Alex

P.S. Is this snapping maybe a bug in Inkscape?
https://bugs.launchpad.net/inkscape/+bug/727281
How could I workaround it please
Attachments
Blank_Scrabble_board_english.svg
The SVG file (author: Denelson83, Wikimedia Commons)
(33.28 KiB) Downloaded 199 times

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

Re: Paste, move colored squares - but keep them aligned to g

Postby Lazur » Sun Mar 02, 2014 12:38 am

Hi.

I set the 15/15 px grid with the origin of X=2,5 Y=-2,5 cordinates and it works "right".
What you could see is that the object snapped to the text's baseline.
Enable snappint to bounding box's corners at the snap bar and disable the other options.
I couldn't turn off the snapping of the texts, but can tell if the texts are converted to paths there won't be such unwanted snapping.

afarber
Posts: 5
Joined: Sun Mar 02, 2014 12:17 am
Location: Bochum, Germany

Re: Paste, move colored squares - but keep them aligned to g

Postby afarber » Sun Mar 02, 2014 12:48 am

Hello, thanks!

If I may ask a "follow up" question for your workaround here - actually for my game I need 1 line texts (like "3W", "2L", ...) - instead of the 2-lined texts in the original SVG file (like "3x newline WS").

So I have changed all texts in my file (attached; used SHIFT-D to jump to originals) and aligned the text fields manually.

Which means I can not use your suggested workaround - because I have misplaced the text fields.

Is there maybe a trick to center a text field inside of the colored square?

Regards
Alex
Attachments
Blank_Scrabble_board_russian.svg
My edited file (with 1-lined Russian labels)
(33.11 KiB) Downloaded 184 times

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

Re: Paste, move colored squares - but keep them aligned to g

Postby Lazur » Sun Mar 02, 2014 1:21 am

Use the align and distribute panel (Ctrl+Shift+A) inside the parent group of the clones.

Good luck!

afarber
Posts: 5
Joined: Sun Mar 02, 2014 12:17 am
Location: Bochum, Germany

Re: Paste, move colored squares - but keep them aligned to g

Postby afarber » Sun Mar 02, 2014 3:27 am

Thank you, Lazur

Where is the align tool that you mean, please?

Here (s. attachment) I select the Text tool in the left toolbar, then change the 2-lined text to 1-lined text "3W".

How can I center-align (both vertically and horizontally) the text now?

(or maybe make the text field fill 100% width and height of the parent)

Regards
Alex
Attachments
inkscape-align.png
inkscape-align.png (97.06 KiB) Viewed 2606 times

afarber
Posts: 5
Joined: Sun Mar 02, 2014 12:17 am
Location: Bochum, Germany

Re: Paste, move colored squares - but keep them aligned to g

Postby afarber » Sun Mar 02, 2014 4:09 am

I've found the Alignment dialog, but what to select there?

Clicking the 3rd icon in the 1st and 2nd row doesn't change anything:

Image

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

Re: Paste, move colored squares - but keep them aligned to g

Postby Lazur » Sun Mar 02, 2014 11:00 am

At the top dropdown menu of the panel select last selected object -instead selection,
then select the text, hold Shift, and select the square below, then click on the third icon at the first and second row.

But again, if you convert the text to path before, you would solve problems.
The align and distribute option is based on the bounding box, but once you view it where the font is not installed that the svg uses, then the replaced font will look off. For example rendered with a browser.

dvlierop
Posts: 139
Joined: Sat Sep 08, 2007 4:25 am

Re: Paste, move colored squares - but keep them aligned to g

Postby dvlierop » Fri Mar 07, 2014 7:13 am

Once an object is snapped to a grid, please consider pressing the ALT key while dragging: this will move the object at multiples of the grid's pitch, making sure that it will always stay aligned to the grid.

afarber
Posts: 5
Joined: Sun Mar 02, 2014 12:17 am
Location: Bochum, Germany

Re: Paste, move colored squares - but keep them aligned to g

Postby afarber » Fri Mar 07, 2014 7:17 am

Thank you!


Return to “Help with using Inkscape”