Jump to content
antonkudin

[Fixed] Layer pixel alignment issues

Recommended Posts

I have 'Force pixel alignment' ON, it should prevent these issues, but doesn't:

 

When placing copied pixels from another document, new layer position isn't properly aligned to pixels, resulting in half-transparent edges.

 

post-296-0-50148400-1488901409_thumb.gif

 

When moving a layer and snapping assistant finds object that has odd width and align to it's center, it will position moved layer into half-pixel coordinate, which again will result in half-transparent edges.

 

post-296-0-88326200-1488901480_thumb.gif

Share this post


Link to post
Share on other sites

I have also seen that in single pixel mode it's quite happy to move things to half pixel boundaries. Really annoying to have to check everything over and over.

Share this post


Link to post
Share on other sites

Also having this problem, especially with artboards. First artboard created is fine, duplicate artboards are all messed up. Not only does pixel alignment not work, but the grid is also slightly off (by subpixel increments).

Share this post


Link to post
Share on other sites

Another issue thats related: if layer is odd-width or height and rotated, it will be rotated around point thats at .5 pixels at some coordinate, resulting in half-pixel position, again ignoring the 'Force pixel alignment' option.

 

If that option is on, no matter what, i expect positions to be exactly on pixel grid.

Share this post


Link to post
Share on other sites

Hi triptiks,

Welcome to Affinity Forums :)

Do you have Force Pixel Alignment checked in the Snapping Manager... (menu View ▸ Snapping Manager)? You need to have this enabled from the beginning if you want the artboards pixel aligned (they are a special kind of objects and are affected by this setting like regular objects. If you still can reproduce the issue with Force Pixel Alignment checked can you please post the steps you are taking so i can see if i can reproduce this here?

Regarding the grid off, this is a known issue already logged to be looked at.

 

@antonkudin

Thanks for the feedback. I don't think Force Pixel Alignment was implemented for rotations. I will pass this to the development team. If you move the rotated rectangle a little it should then realign with the grid.

Share this post


Link to post
Share on other sites

The behaviour is the same for me with "Move by whole pixels" enabled or disabled.

 

I can happily move a shape/rect by half pixels.

 

When I draw the shape/rect on the screen the initial draw also falls on half pixel boundaries.

 

I'm using a MacBook Pro with Retina display if that makes any difference?

Share this post


Link to post
Share on other sites

I am following up with this.

 

I opened the same bug long ago and was told that everything was working. Now I have to do a lot of design again and went back to Designer to try it again let me be clear: nothing works.

 

Pixel alignement do not work, force pixel move do not work and if you had snapping on top of it, it doesn't work either. 

In this current state, Affinity Designer is barelly usable for any UI purpose on the opposite of what you advertise.

 

I have object at 29.6 pt even if I activate "whole pixel" options. They thing with move by whole pixel: If I move this object, it will move +- 0.5pt and thus stay in NON-aligned pixel coordinates (30.4, 30.9, etc...).

 

The alignement tools do NOT check if the object is aligned in the first place and just do a dumb addition / soustruction of half a point.

 

The same applies with shapes which will not aligned correctly on the pixel level / grid. I have to constantly put round numbers manual on shapes and coordinate which makes me lose a TONS of time. And as soon as I have to reorganize the view to a new grid / layout, the nightmare begins.

 

I hope 1.6 address this issue and that it is a top priority in the list of things to fix.

 

THIS IS NOT GOOD.

Share this post


Link to post
Share on other sites

This is just not plain not working. Those are my setups. Force 100% whole pixel, only snap to the grid which is whole pixel too. I move my object around. here comes 26.1pt, 16.3pt, 26.4pt. Not only it doesn't move pixel by pixel or point by point, but it doesn't even Snap to my pixel grid which is the only option available.

 

And the problem is that the layering engine so so buggy that it impacts everything: if you work with Symbols and Assets you will just go insane because all those little bugs cumulates at every level of the apps.

 

As sublayers under groups or symbol won't align correctly, then when you try to move the whole thing, the pixel alignement won't work and will corrupt everything.

 

Then what looks mostly ok on the screen will appear not aligned in PDF export and you will realize that the App aligned at 32.1pt instead of 32pt.

 

And the thing is, once your file as wrong coordinates / size which do not match whole pixels, you can say goodbye to your file because there is no way to force everything to be aligned afterward.

 

Like I said, it feels like the alignment engine is just a restriction applied when you move object but not a rule enforced. So if you have previously layers / symbols  not aligned (and you will because the alignment do not work), too bad.

post-287-0-45192400-1491492114_thumb.png

Share this post


Link to post
Share on other sites

move by whole pixels, overrides pixel alignment 

 

so if you have a 1px object that is at x 1,1 and y 2,2 e.g. and move it, it will only be moved by whole pixels 

you have uncheck "move by whole pixel" and move it so that it can snap to a certain pixel, flush 

 

furthermore if you have an object that is 1,1px wide and you just move it, it will never be aligned 

 

easiest thing to is

: only set "force pixel alignment" and then make sure all objects have integer values, no 1,xyz

: move them a little so that they snap to the pixels, snap to integer values, no 1,xyz

: turn move by whole pixels on

 

done 

 

hope that works 


 

 

Share this post


Link to post
Share on other sites

Hi matt,

I'm assuming the rectangle dimensions are integer values.

Do you have any grid (and snap to grid) active/enabled?

 

Yes, I have everything enabled that should help me lock to pixels.

 

Rectangle is integer pixels wide.

 

easiest thing to is

: only set "force pixel alignment" and then make sure all objects have integer values, no 1,xyz

: move them a little so that they snap to the pixels, snap to integer values, no 1,xyz

: turn move by whole pixels on

 

done 

 

hope that works 

 

There should be no requirement to "hope" and your solution does not work for me, see my file below.

 

 

If i disable 'Move by whole pixels' and leave 'Force pixel alignment' on, i can move layer a little and it snaps to pixels.

 

Interesting. I get mixed results regardless of that setting.

 

I am seeing certain objects in my file move by single pixels and others do not.

 

Here's a file that shows this:

the green rectangle moves by half pixels,

the grey rectangle moves by whole pixels,

both rectangles dimensions are whole pixels.

 

It seems there are some hidden properties on the objects that are causing havoc with these snapping options?

pixels.afdesign

Share this post


Link to post
Share on other sites

Here's a video

 

As I played with the shapes, the one that was moving whole pixels decided to start moving half pixels!

 

It seems to be as soon as the "distance from the other object" is displayed, the movement by whole pixels goes to half pixels?

I've even seen it move by a whole pixel, then a half pixel, then a whole pixel, and so on...

 

Please ignore the canvas jitter, that's what I have to put up with using an Apple Magic Mouse  :wacko:

Snap-Crazy.mov

Share this post


Link to post
Share on other sites

So I shouldn't use snapping with the other modes? That makes no sense.

If they shouldn't be used together, it would be great if it was disabled to stop me using it.

 

Here's my snapping manager panel, it seems I am using "no preset"!?!

 

edit: I am having more luck with snapping disabled but it's still not perfect...

 

if I have an object ion a half pixel boundary and then disable snapping, I would expect it on next move to align to a whole pixel (because Force Pixel Alignment) but it does not.

 

post-1261-0-86469900-1491559054_thumb.png

Share this post


Link to post
Share on other sites

So I shouldn't use snap to grid with the other modes? That makes no sense.

If they shouldn't be used together, it would be great if it was disabled to stop me using it.

 

Here's my snapping manager panel, it seems I am using "no preset"!?!

 

edit: I am having more luck with snapping disabled but it's still not perfect...

 

if I have an object ion a half pixel boundary and then disable snapping, I would expect it on next move to align to a whole pixel (because Force Pixel Alignment) but it does not.

 

attachicon.gifScreen Shot 2017-04-07 at 10.56.50.png

that is because you have "move by whole pixels" enabled which overrides the "force pixel alignment", see my video at the end 

 

I'm not sure why snap to grid behaves this way either 


 

 

Share this post


Link to post
Share on other sites

that is because you have "move by whole pixels" enabled which overrides the "force pixel alignment", see my video at the end 

 

I'm not sure why snap to grid behaves this way either 

 

Thanks for your video. I will switch off snap to grid when doing pixel work in future.

 

The logic of how these options work together is beyond me. What a mess.

Share this post


Link to post
Share on other sites

So I shouldn't use snapping with the other modes? That makes no sense.

If they shouldn't be used together, it would be great if it was disabled to stop me using it.

 

Here's my snapping manager panel, it seems I am using "no preset"!?!

 

edit: I am having more luck with snapping disabled but it's still not perfect...

 

if I have an object ion a half pixel boundary and then disable snapping, I would expect it on next move to align to a whole pixel (because Force Pixel Alignment) but it does not.

 

attachicon.gifScreen Shot 2017-04-07 at 10.56.50.png

 

I'm not sure i understood your question. What are you intended to achieve? Getting rid of the half pixel snapping, so everything snaps to full pixels?

If so select the UI Design preset then uncheck Snap to grid. Additionally you can also disable Move by Whole Pixels although this is not really necessary assuming you create everything with integer values.

In these conditions there's only one situation when an object may fall in an half pixel: it's when you are trying to create or move an object that's being aligned with the middle of another object with an odd width or height (or with the middle of the page spread).

 

If this is not working for you with these settings then there may be a bug somewhere (or i am missing something). In that case can you record me a video with the specific situation where this is failing?

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

×

Important Information

These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.