El Drijver
-
Posts
4 -
Joined
-
Last visited
Posts posted by El Drijver
-
-
72pt dpi correct.
Slices themselves are indeed in pixels. So the 24pt asset comes out as 24px @1x. Indeed.
The artboard itself is indeed not aligned on whole points within the document where multiple artboards exist. So no, the artboard itself is not positioned at 0,0. (It was positioned at 2677.7pt for whatever reason as mentioned earlier). And I understand I have to fix that part to 'make it work'. But my question is, why? Why do I have to hunt this down? Within the artboard, the sizes of assets are defined as whole points on coordinates that are whole point values.
If the artboard is on 0.0000, 0.0000 and my asset within the arboard is on (0.0, 0.0) with the size of 24pt, it will come out correctly as 24px, 48px and 72px for @1x, @2x and @3x. This is not broken, it works as intended. My question is, why does it matter if this artboard is not on whole points. Ultimately you have a 24pt object and I don't think there is a situation where anyone would want (or expect) that this object comes out as a 24px @1x and a 49px @2x assets (from a 24px slice), just because the arboard has a certain location in the document.
Don't get me wrong, I am not stuck here, I know what happens, but part of this 'align everything to whole points' struggle seems unncessary. I always just work around this issue, but I wanted to voice it this time.
I hope I clarified the points (heh) that were unclear before 😊
-
I understand the dance I have to do to get the 'correct assets' out of it. And I'm not trying to make assets that are half a pixel wide, I hope that is obvious.
The point is, why should the artboard be aligned on 'whole points'? Let's not talk about pixels in the source file. Each artboard contains its own coordinate system internally. The top left corner within each artboard is (0, 0), great. Yet placing an object there of 24pts will result in a 49px @2x asset if the artboard itself is not placed on 'whole points exactly'. There is no usecase where anyone would want that to happen.
edit:
I generally work in points because we work with iOS interfaces that ultimately are based on points. You want to work with the size that the user 'sees' on the screen and not be bothered by how many pixels that is for each device.
-
I couldn't find this exact issue, so decided to post after running into this (again).
This is more like a situation where I don't understand why it is this way, rather than me being stuck. I can work around this issue and have done so for years. But it has been a source of frustration and each time I thought it was either my fault or something I was in the wrong mindset for, but in the end I still can't wrap my head around it.
Here goes. I currently have assets for a UI in an affinity designer file on Mac (Big Sur, running latest Affinty, but it has occured over the years). Everything is in points. I always make sure that groups or layers I use for slices are aligned on whole points. From the top left oriented in the 'transform' panel I retype the location in whole points because years of Affinity use has taught me that it might be 'partial' points or whatever, even with all possible snapping and forcing to 'whole points'. The slice I create for it matches up. This particular layer is 36ptx24pt. Exporting it in 1x, fine, exporting it in 2x results in 72px x 49px. This is maddening. I made sure everything is whole values-point-zero everywhere. Yet somehow the rounding goes wrong somewhere.
After searching for a while I realized this particular file uses artboards, which my colleague sometimes prefers. Lo-and-behild, the artboard that contains the layers is aligned on value-point-seven. (2677.7pt in this case, but the value itself is not the point). Aligning the artboart to 2677.0 manually fixes the export of my tiny asset. Why?
Why is it always so hard to get the desired, nay, expected pixel values from my slice exports. If a layer is 24pt in 1 dimension, honestly nobody wants it to be 49px when exporting it at 2x. The world coordinates of whatever encapsulating group / layer / artboard should not matter, should it?
This situation has been here for years. I have used AD since the week it was released, 7 years now. It is amazing software and I do -everything- with it, but this issue keeps popping up. Why is it this way? Am I doing something wrong?

points to pixels doint match up when exporting slices
in Pre-V2 Archive of Affinity on Desktop Questions (macOS and Windows)
Posted
Thanks, this indeed covers the same question. At least they seem to be aware of the situation.
Thanks @Hangman for expanding on the situation it does indeed occur between other conversions as well, but it is of course expected when a unit converts to fractions of a different unit. (while the point to pixel, in certain circumstances, should really just be 1:1).
Thanks for all who chimed in.