Jump to content

Recommended Posts

I'm using the ui design snapping preset, and I've played around with the tolerance as well with no change in the following behaviour.

 

Even drawing the simplest rectangle object on the canvas creates fractions within the width, height as well as x & y axis values. When you draw these objects on a blank page you won't see this bug, but as soon as you have a few more layers, lets say with a text blocks on the page and maybe an image here and there, as you draw an object 50% of the time you get whole values, the rest of the time the snapping guides will target the other objects on the page a force align my drawn object to it but by creating a fraction value within the width, height, x & y axis.


---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----

Innovation is often the product of constraint

Share this post


Link to post
Share on other sites

Hi Kevin,

 

I have the suspicion this might be due to the Include bounding box mid points option that’s engaged in that setting. Say, you create a square with an uneven side length: then snapping to the bounding box mid point will probably create an object that has a (n+0.5) pixel sided bounding box, and snapping to the mid point of the latter one will probably create an object that has … you see the pattern …

 

Maybe you could try to disengage this option and see if the problem persists …  :unsure:

Cheers, Alex

post-1198-0-28038900-1446584017_thumb.png

post-1198-0-24053400-1446584165_thumb.png

Share this post


Link to post
Share on other sites

Thanks A_B_C that did help a bit. The half pixels that this setting creates only happens on objects though. There's still the problem with objects that snap to text layers and this is what creates the other fractions.


---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----

Innovation is often the product of constraint

Share this post


Link to post
Share on other sites

I see … but I fear disabling the mentioned option is the only thing you can do at the moment … 

 

As an aside … perhaps it would be a good idea to improve on snapping to text objects in the future. Although I do see some reasons for the current behavior, there are still some quirks in my opinion. Snapping is confined to the first character of a word or phrase, and if that character extends below the baseline (say, for optical reasons, as in my example below), you can’t get a correct (optical) alignment to the baseline of your text through the use of snapping …  :(

 

Cheers, Alex  :)

post-1198-0-35708000-1446711561_thumb.png

Share this post


Link to post
Share on other sites

I intend to look at snapping to text in the future.  It could be that I add an option to exclude text objects - or have options to determine what of the text object is snappable.

 

As for the problem you've highlighted - it's really down to your choice of snapping options.  We give lots of snapping configuration for this reason.  I suggest that if you only want to snap to pixels, turn off all other snapping and just enable Force Pixel Alignment. All new objects will be created on pixel positions.

 


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

Ben that is great advice thanks, it works great.

 

Just seems odd that there is a Preset for UI Design, yet it creates the most unwanted side effects for ui design. When you design interfaces, the last thing you need is blurry assets when exported. Obviously while in vector everything looks great, but once exported, if your co-ordinates or sizes contain fractions then you are screwed.


---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----

Innovation is often the product of constraint

Share this post


Link to post
Share on other sites

Fair point.  Text has always been something we needed to look at again properly.  When I wrote the bulk of snapping, the text engine was still being developed.

 

Text won't be the only objects that cause off-pixel snapping.  If you draw arbitrary curves, or create a shape layer (such as a Star or a Cog), chances are the real bounds of the object will be off pixel - with shapes this will be because the actual object is created within the dragged rectangle, but may not fill the rectangle.  Snapping to these objects bounds will still result in off-pixel positions.  This is then down to your choice of snapping setup.  If the whole world was a grid aligned rectangle, these issues would not exist.

 

For the most part, I would imagine that people would want to snap to the bounds of objects when doing UI work, so the preset makes sense in the majority of cases - it's up to you to put the objects on pixel.  To aid in this, I added a feature in the Move Tool to normalise the selection box so that you can snap any object onto pixel positions. Use the '.' (full stop) key to cycle the bounding box. So, if you create a Star, you can then normalise the selection rectangle and then position the bounds of the actual poly outline onto pixel positions.

 

Of course, snapping also shows you indicators (smart guides? - I hate that phrase) to show you what is being snapped to.  If that happens to be a text object, you still have the choice to snap to something else, or press Alt to override snapping.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

I tried using the '.' full stop to cycle the bounding box. I can't get this to work properly, obviously I'm doing something wrong. I'd love to see a demonstration of this.

 

In my experience the bounding box just kept cycling between more fractions.


---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----

Innovation is often the product of constraint

Share this post


Link to post
Share on other sites

I tried using the '.' full stop to cycle the bounding box. I can't get this to work properly, obviously I'm doing something wrong. I'd love to see a demonstration of this.

 

In my experience the bounding box just kept cycling between more fractions.

 

Then your original object is not on pixel, and the tight bounds is also not on pixel.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

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

×