patrick_h_lauke Posted September 19, 2020 Share Posted September 19, 2020 This may be intentional, but it's non-obvious: when trying to work on pixel art/assets, with "Force pixel alignment" and "Move by whole pixels" enabled, having "Snapping" enabled as well often leads to half pixel coordinates when pasting pixel content and when moving items/layers/elements with the mouse. If this is intentional, it should be made visually clearer somehow. Otherwise, even when snapping is enabled, the coordinates should still honour pixel alignment/whole pixels. screenshots: in the pixel font only example, dragging the layer with the mouse moves it in whole and half pixel steps, despite the "move by whole pixels". in the paperboy example, copy/pasting a pixel layer of 45x34px on a 150x150px document pastes it at the center, resulting in half pixel coordinates. again, it should honour the "force pixel alignment" here. Quote Link to comment Share on other sites More sharing options...
walt.farrell Posted September 19, 2020 Share Posted September 19, 2020 I'm not sure what's happening, but just to make sure you know: with "move by whole pixels" enabled, if something starts out positioned at a fractional pixel, say at X=4.5px, and you move it horizontally, when you stop it will still be on a.5px boundary. The movement is in whole pixels with that option on, e.g. from 4.5 to 5.5 to 6.5, etc. That suboption of "force pixel alignment" keeps unaligned objects unaligned as they move, while forcing new items to be aligned, and aligned items to stay aligned. I don't know if that explains any of what you're seeing. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 17.7, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.7 Link to comment Share on other sites More sharing options...
patrick_h_lauke Posted September 19, 2020 Author Share Posted September 19, 2020 ok, let me explain further: when all options are enabled (force pixel alignment, move by whole pixels, snapping): - pasting some pixel data to a new layer will always attempt to center that layer. depending on dimensions of the document and the pixel data you're pasting, the new layer with the pasted data can end up being pasted at a half pixel position. i'd expect that, with "force pixel alignment", pasting it would still try to paste and position it at a full pixel coordinate. - moving items with the keyboard does indeed move them by whole pixels. however, when snapping is enabled, moving elements with the mouse moves them by half pixels as well. only if i turn of snapping does moving elements with the mouse always put them on whole pixels Quote Link to comment Share on other sites More sharing options...
patrick_h_lauke Posted September 20, 2020 Author Share Posted September 20, 2020 if these aren't bugs but "works as intended, just unintuitive/surprising for users", then feel free to move this to something more appropriate like the feature request section (with the request being to either *really* force pixel alignment even when snapping is enabled, moving things with mouse and pasting things always on full pixels only, introducing some further "also force this when snapping is enabled" extra option, or at least visually separating the "force pixel alignment" and "move by whole pixels" from the "snapping" button if they're interfering / interacting in surprising ways and it's intentional and to be kept this way) Quote Link to comment Share on other sites More sharing options...
telemax Posted September 20, 2020 Share Posted September 20, 2020 If the "Snap to grid" option is disabled, snapping to the center of pixels is ignored. Quote Non-destructive Mask https://forum.affinity.serif.com/index.php?/topic/150439-non-destructive-mask/Image layer & Pixel layer https://forum.affinity.serif.com/index.php?/topic/146720-image-layer-and-pixel-layer/Brushes | Stars https://forum.affinity.serif.com/index.php?/topic/135202-brushes-stars/ Link to comment Share on other sites More sharing options...
patrick_h_lauke Posted September 20, 2020 Author Share Posted September 20, 2020 the problem seems to boil down to two things: - if the pixel clipboard data has odd dimensions, and the document itself has even dimensions, pasting will center the pixel data's center point to the center of the document. e.g. if the document is 150x150px, and my clipboard contains a 31x31px chunk, it will place the center of that chunk at x:75 and y:75, but then all the edges will be on half pixels (because 31/2 = 15.5). this regardless of any "force pixel alignment" - it seems it's not the "Snap to grid" that was giving me issues when moving the layer with the mouse, but rather the various "mid points" that kept dragging the layer to align to half pixels For the first point, that may be considered a bug (if I paste pixel data in a document with forced pixel alignment, i'd expect the paste operation to also obey the forced pixel alignment). For the latter, it may be "as intended", but it's certainly unexpected that, again, when forced pixel alignment is in place, you can still end up moving things to half pixels due to the midpoint etc snapping. Quote Link to comment Share on other sites More sharing options...
walt.farrell Posted September 20, 2020 Share Posted September 20, 2020 12 hours ago, patrick_h_lauke said: For the latter, it may be "as intended", but it's certainly unexpected that, again, when forced pixel alignment is in place, you can still end up moving things to half pixels due to the midpoint etc snapping. I suspect it's intended, and the theory is that by adding those snapping options you're providing additional overrides (beyond the possible "Move by Whole Pixels") that take precedence. If you didn't want that, you wouldn't set those options. Of course, even if I'm right, it requires a fairly good level of knowledge for users to use it successfully. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 17.7, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.7 Link to comment Share on other sites More sharing options...
patrick_h_lauke Posted July 10, 2022 Author Share Posted July 10, 2022 as I was recording a video already for here's also a video of the problem here. copy a pixel-perfect selection into another document - despite all the snapping and aligning to pixel grid etc on, it will paste it to whatever the middle of the image/viewport is, often leading to fractional coordinates. it should ideally, when pixel snapping/aligning is turned on, then round it up and paste it to the nearest full pixel instead, I'd say. (in this video, the copied bit is 143px x 57px, and the target document is 150px x 150px. once pasted, the bit is positioned to X 2px and Y 46.5px) affinity-photo-copy-paste-fractional.mp4 Quote Link to comment Share on other sites More sharing options...
patrick_h_lauke Posted July 11, 2022 Author Share Posted July 11, 2022 another video recording, just to rule out some other factors. source document is a fullscreen screenshot 1920x1080 at 96dpi. I made a selection of 142x45 and copied it. then, I open a new 150x150 at 96dpi document, and paste. i have Force Pixel Alignment checked, and unchecked everything else just to make sure it's not interfering. the pasted clipboard data is positioned at X 4px and Y 57.5px ... i.e. it tries to center the pasted data. it *may* be that it's because the source document is much larger than the target document, and the coordinates where the clipboard data was copied from are out of bounds of the target document, so it instead tries to center it. but the centering does *not* take into account the "Force Pixel Alignment" and just does a naive centering resulting in fractional coordinates. /cc @Dan C affinity-copy-paste-pixel-alignment-fractional.mp4 Quote Link to comment Share on other sites More sharing options...
Dan C Posted July 11, 2022 Share Posted July 11, 2022 Thanks for the further screen recording & information provided! 44 minutes ago, patrick_h_lauke said: it *may* be that it's because the source document is much larger than the target document, and the coordinates where the clipboard data was copied from are out of bounds of the target document, so it instead tries to center it. but the centering does *not* take into account the "Force Pixel Alignment" and just does a naive centering resulting in fractional coordinates. I agree, and I believe this is the step I was missing in my testing. Going from the smaller to larger document works as expected, as the X&Y location of the layer/copied information can be respected - but when going from larger to smaller, where the X&Y values would be off canvas, the object is pasted centrally and ignores the aforementioned snapping options. As far as I'm aware, I believe this to be a bug also, so I'm getting it logged with our devs now patrick_h_lauke 1 Quote Link to comment Share on other sites More sharing options...
patrick_h_lauke Posted July 11, 2022 Author Share Posted July 11, 2022 again, thank you @Dan C Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.