Jump to content
You must now use your email address to sign in [click for more info] ×

Recommended Posts

Hi! I'm new to Affinity and this forums. Let me start congratulating the Serif them for their great products! Recently I bought the 3 of them :) very satisfied with them.

I have one question though, Is there a way to create an element, say a rectangle, in a "pixel perfect" position? 😁

Every time I create an element, its created on "decimal or sub-pixel" position, let say 242.6 px (X Position) and 206.3 px (Y Position) then I have to manually fix those values deleting the decimal on each value. Personally I need a lot of "pixel perfect alignment".

I had the same problem with the actual size of the elements, always creating a sub-pixel size elements, then I started to play around with the "Snapping Manager" checking and unchecking boxes until I found a correct combination of settings that allowed me to create full/whole pixel elements, and that's great! but now I'm stuck with sub-pixel positioning, and I can't find any other option that I can enable/disable in order to get "whole-pixel" positioning.

Is there a way to achieve this? that when you create or move a vector element can be created or moved in a whole-pixel position or full-pixel increments?  That would be great.

Thank you all in advance! 😅

Link to comment
Share on other sites

Under snapping try these settings... 

  • Force pixel alignment: On
  • Move by whole pixels: Off
  • Candidates: Candidates list
  • Include bounding box mid points: unchecked

 

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

1 hour ago, firstdefence said:

Under snapping try these settings... 

  • Force pixel alignment: On
  • Move by whole pixels: Off
  • Candidates: Candidates list
  • Include bounding box mid points: unchecked

 

Hi! thank you so much for your fast reply! I really appreciate it!

That being said...sadly non of those options really helped. The shapes kept being generated in sub-pixel X and Y positions ...BUT!!!... I didn't gave up! and I think I found the solution!

After tried several settings combination on the "Snapping Manager" (because the logic thing is that you would find that kind of option there) in a final "hail Mary" I went to "Preferences" hoping for the best, and lo and behold! I found under the section "User Interface" the sub-section "Decimal Places for Unit Types" and changed the "Pixels" value from 1 to 0

I created a shape after this and it was fixed! now all shapes are created on a whole-pixel X & Y position!

image.png.d351e8e2c2d00c03e0494ac4964e7d41.png

Link to comment
Share on other sites

That option in the Preferences only dictates how many decimal points are displayed; it does not affect the number of decimal points in the actual values within the software/document.
If you set the number of decimal points to zero you open yourself up to potential problems where fractions are there but you cannot see them. For example, you might see 10 in the UI but the actual value could be 10.005.
I would recommend setting the number of decimals to at least 3 so you can more-easily see when fractions exist and act on them accordingly.

Link to comment
Share on other sites

1 minute ago, GarryP said:

That option in the Preferences only dictates how many decimal points are displayed; it does not affect the number of decimal points in the actual values within the software/document.
If you set the number of decimal points to zero you open yourself up to potential problems where fractions are there but you cannot see them. For example, you might see 10 in the UI but the actual value could be 10.005.
I would recommend setting the number of decimals to at least 3 so you can more-easily see when fractions exist and act on them accordingly.

Oh...I see now.... LOL you are right. That only "hid" de "problem" not actually solved it....

So, is there a way for the shapes to be created on whole-pixels without the manual position adjustment after creating them?  :(

Link to comment
Share on other sites

All right, here's another "solution" please confirm if you are so kind...

I went to "View" then "Grid and Axis Manager"

image.png.b132dd963bd325acbac759aaae7cc361.png

Then I checked the "Show Grid" option (this I think this step is really optional) then I selected 10px for "Spacing" and 1px for "Divisions"

image.png.5dd1666b5b4b58bbf13f3b057f9ca91e.png

Then activated the "Snap to Grid" option under the "Snapping Manager" and voilà!

image.png.26f8281df4e7e6ef1755377dfb08bbdb.png

Now all the shapes are created in whole pixels according to the grid!

Please don't come and rain in my parade :( just kidding, please let me know if this is actually a solution for the sub-pixel positioning! I think it is, but then again, I'm just a newbie. :(

Link to comment
Share on other sites

Discussions about this have been circling the forums for many years and it can be confusing.
If, as firstdefence said above, you switch “Force pixel alignment” to ON, every new layer you add after switching it on will be aligned to the pixels but any layers added before you switched it on may not be pixel-aligned and will need checking and adjusting if necessary.
If you move a layer which was created before you switched “Force pixel alignment” to ON its X and Y coordinated will be aligned to the pixels but its Width and Height may not be and may need to be checked/altered.
While “Force pixel alignment” is switched ON, if you also switch “Move by whole pixels” ON, if your existing layer’s X and/or Y coordinates were not pixel-aligned then they will remain non-pixel-aligned when you move the layer.
My video – showing a 10×10 pixel document – might make things a little bit clearer.

Link to comment
Share on other sites

Thanks Garry! you have been very helpful! thank you for the video.

If I understand correctly, there's virtually not a perfect way to create a new shape totally aligned to a whole-pixel position. I kind of achieve it with the options I mentioned on my last comment, but If I zoomed in and create a shape there, it would be created on sub-pixel positions.

That configuration worked better when you have a open view (zoomed out) of your document. The cursor snaps to the intersection on every 10px and its way easier to create a "pixel-perfect" shape on a "pixel-perfect position"

:) what do you think?

Link to comment
Share on other sites

Snap to grid will not necessarily force a pixel alignment as snapping is just a way to help you to align things rather than a way of making sure how things are created. Snapping is a ‘helper function’ rather than a ‘design enforcement’ function. Even with snapping to the grid ON you can still create layers which are not pixel-aligned (see attached video).
If you need pixel-alignment within your document then you need to make sure that “Force pixel alignment” is set ON from the start and don’t switch it off.
P.S. Remember that if you give a layer a centre-aligned outline (Stroke) [as mentioned by Alfred below] then that stroke will not necessarily be aligned to the pixels as it is measured from the outline of the layer, which in this case will be a pixel boundary (see attached image).

Annotation 2020-08-13 100828.png

Edited by GarryP
Clarification.
Link to comment
Share on other sites

45 minutes ago, GarryP said:

P.S. Remember that if you give a layer an outline (Stroke) then that stroke will not necessarily be aligned to the pixels as it is measured from the outline of the layer, which in this case will be a pixel boundary (see attached image).

That image shows the stroke alignment set to ‘Centre’. If you change the alignment to ‘Inside’ or ‘Outside’, a stroke which is one pixel wide will be contained within the pixel boundaries instead of straddling them.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | 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.