Jump to content
Sign in to follow this  
Pavel

Always move by whole pixel (never see decimals in Transform panel)

Recommended Posts

Hi,

 

Is there a way to work with Affinity Designer so that I never get decimals in the Transform panel? I'm getting mixed results with using "Force Pixel Alignment" and "Move by Whole Pixel" and due to snapping/aligning, I sometimes still end up getting : X: 900px | Y:62,5px

 

Of course this makes sense, if you align something in the middle, and the heights don't match, you do the divide by 2, and get a ,5 decimal... but it makes me always having to check the transform panel to make sure I don't have "badly" positioned elements.

 

The reason I want this is for better export. I found that export works best if things are aligned on full pixel value.

 

Maybe you can change the logic of the "Force Pixel Alignment" and/or "Move by Whole Pixel" to actually reflect this and do rounding of values whenever decimals are present.

 

The explanations above are a bit all over the place, hopefully you understand the goal.

 

If I were to go deeper into implementation, I would say this would make sense for "Move by Whole Pixel" with the rounding of the X / Y values. If user holds ALT / OPTION key pressed, then maybe allow decimal values, as an exception.

 

Width and Height with decimals are maybe not that big of a deal, because the export slice can be set to a whole number, but the reference point (X/Y) is pretty important.

Share this post


Link to post
Share on other sites

Hi Pavel,

If you disable Move By Whole Pixels and left Force Pixel Alignment checked from the beginning it should do what you want, unless you use the transform panel to perform math operations that end with decimal values. Snapping will not interfere in this case because all objects are all pixel aligned from the beginning.

 

Currently there's no way to automatically adjust existing object's position so they fit the pixel grid.

Share this post


Link to post
Share on other sites

Hi,

 

This is what I also thought, but snapping does affect the X / Y position and this can sometimes be a value with ,5. Please notice the attached screenshot. The 2 rectangles are created, then I move the black rectangle around. Without snapping it always goes to a position that has a full pixel value (great!). But then it snapped to align its middle to the bottom line of the gray rectangle, at which point the Y value received a ,5 px.

 

This is why I'm thinking there might be a need for a rounding method to be applied on the pixel value when "Force Pixel Alignment" is set. I don't want to disable snapping just because I'm worried about decimal values in X/Y :-(
And at the same time, I want to be able to create objects, align them, move or resize them, without worrying about decimal values...

post-2036-0-58508000-1459774570_thumb.png

Share this post


Link to post
Share on other sites

This has been a constant struggle for me. Just today I changed my settings and it seems to be working now. As long as the artboard is on a whole pixel from the start, moving it around will maintain that. 

Screen Shot 2019-09-13 at 2.48.50 PM.png

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
Sign in to follow this  

×

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.