Make inkscape always round pixels (ie x=4 instead of x=4.532

Post questions on how to use or achieve an effect in Inkscape.
nightowl
Posts: 1
Joined: Tue Feb 16, 2010 6:47 pm

Make inkscape always round pixels (ie x=4 instead of x=4.532

Postby nightowl » Tue Feb 16, 2010 6:58 pm

Hi Guys

Is there a setting somewhere that will force inkscape to work with pure full pixels. By "pure full pixels" I mean, x and y should not have fractions. In certain documents - like for print work - the "fraction" x and y system works great, because you can space things to the nanometer. But in web dev the 4.3342 for x and 80.3423 for y is driving me a bit nuts.

I already looked at the options and set my "Steps" -> Arrows to 1px. The problem is when you resize a block with the mouse everything goes back to fractions.

Any ideas on how I can force inkscape to always round pixels to a full number when I'm resizing using the mouse? At this stage I fix everything by manually typing out the x an y values in the toolbar, but this is a very slow and tedious process.

Your help would be much appreciated

Thank you

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

Re: Make inkscape always round pixels (ie x=4 instead of x=4.532

Postby microUgly » Tue Feb 16, 2010 8:36 pm

The only way I know of is to use a grid. But you have to take into account stroke thickness. A stroke of 1 pixel on shape is positioned such that 0.5 pixels of the stroke is inside the shape and 0.5 is outside the shape. So you actually need two sets of guides to allow for half pixels so you can position a 1 pixel stroke appropriately. Sorry if my explanation is confusing.

User avatar
tomh
Posts: 218
Joined: Sat Feb 14, 2009 10:14 pm

Re: Make inkscape always round pixels (ie x=4 instead of x=4.532

Postby tomh » Tue Feb 16, 2010 10:36 pm

There is also an extension to do this: pixelsnap ( http://code.google.com/p/pixelsnap/ ) Have not used it myself, but apparently it works well

bryhoyt
Posts: 7
Joined: Wed Sep 23, 2009 7:33 am

Re: Make inkscape always round pixels (ie x=4 instead of x=4.532

Postby bryhoyt » Tue Feb 23, 2010 5:33 am

I'm the author of the PixelSnap extension, and it does what you want. You can get it at http://code.google.com/p/pixelsnap/ (same link tomh gave).

The only gotcha with PixelSnap is that it does not work live. You have to edit your shapes, and run the extension afterwards. However, it can modify the whole document at once, so the most efficient workflow is to do a lot of editing, then select all items in your document (Ctrl-A), and run the PixelSnap extension on those items.

I'm planning to make the extension run live in real time by using the new DBus architecture, but that could be a few weeks/months away.


Return to “Help with using Inkscape”