MatthijsR

Snap to pixel

4 posts in this topic

In good old Fireworks the shortcut key CTRL-K (Snap to Pixel) forced snap all of a shape's nodes to pixel edges. This is especially useful for avoiding anti aliasing edges where you want sharp edges. Would be a very helpful feature since now I often see myself dragging edge nodes to pixel edges after scaling shapes.

Share this post


Link to post
Share on other sites

Hi MatthijsR,
Welcome to Affinity Forums :)

Enable Force Pixel Alignment in the Snapping Manager (menu View ▸ Snapping Manager...) or clicking the respective icon in the main toolbar (near the magnet icon group on the left). Note this only has effect on objects you create after enabling it.

Share this post


Link to post
Share on other sites

I am using that constantly. On scaling however, pixels still end up anti aliased, all around a rectangle for example. Also, if you scale multiple elements, the scale value can very well end up at 1/2 pixel, you end up with anti aliasing at two or four sides.

Also, the 'move by pixel' option keeps confusing me, I find myself checking it on and off all the time trying to keep pixel perfect shapes pixel perfect.

 

Edit:

just tested it - Force pixel alignment button on + move by whole pixel on > create (pixel perfect) rectangle > drag rectangle > still moves on half (?) pixels

 

Also: draw a rectangle pixel perfect, resize by value, you end up with the other sides anti aliased (obvjously)

 

 

Share this post


Link to post
Share on other sites

Hi MatthijsR,

There's quite a few things that affects this: are you setting the stroke alignment to inside or outside? By default Affinity aligns the stroke to the middle of a path, so even if the path/shape itself is perfectly aligned (the filled area), one pixel stroke will still  fill two rows/columns unless you align it to inside or outside. Regarding scaling: make sure you increase the screen tolerance value to force the scaled path/shape to snap to the grid in particular if you are zooming in constantly.

 

The half pixel alignment is controlled by the type of grid you are using: the automatic grid aligns to both whole and half-pixels; custom grids you set will align only to whole pixels.

Move by whole pixels is to ensure that objects yours want to keep sub-pixel aligned remain that way when you move them. So a 10x10px square positioned on X:10.5 px Y: 20 for example will end up with the X coordinate ending in .5px.

Without seeing you file and snapping/grid settings it's difficult to guess what's may be causing you trouble.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now