Skip to content

[regression] Marqueed selection gets some rows duplicated when moved left and right over left canvas edge with Ctrl still pressed #2891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nkoder opened this issue Aug 17, 2021 · 2 comments
Assignees
Milestone

Comments

@nkoder
Copy link

nkoder commented Aug 17, 2021

Steps to reproduce:

  1. Download and open this file (link) in Aseprite 1.3-beta5 (please let me know if link don't work for you or I accidentally made it obsolete – I will provide you with a new one)
  2. Hide "doors" layer
  3. Select "items front" layer
  4. Zoom to 400% with shortcut 3
  5. Move viewport around to see bottom left group of bottles and left canvas edge
  6. Press M for marquee tool
  7. Select middle front bottle as on attached screenshot
  8. Press Ctrl and keep it pressed for issue to appear, then press mouse on selected area and start moving it around. During movement cross left canvas boundary multiple times.
  9. During such movement you should observe duplicated columns of pixels to appear, which is not as expected. Those artifacts does not disappear when movement is finished. See attached screenshot.

Screenshots

Selection to reproduce an issue:

Screen Shot 2021-08-17 at 09 12 54

Artifacts during/after movement:

Screen Shot 2021-08-17 at 09 21 32

Additional info

  • I guess issue can be reproduced in a more generic way than what I have written down above.
  • I checked same reproduction steps in 1.2.28 from standalone installer and issue does not happen there, therefore I treat it as regression.

Aseprite and System version

  • Aseprite version: 1.3-beta5, Steam
  • System: macOS Big Sur 11.5.1
@dacap dacap added this to the v1.3-beta8 milestone Oct 29, 2021
@dacap dacap self-assigned this Oct 29, 2021
@dacap dacap modified the milestones: v1.3-beta8, v1.3-beta9 Jan 12, 2022
@dacap dacap assigned iamOgunyinka and unassigned dacap Feb 2, 2022
@iamOgunyinka
Copy link
Contributor

@Gasparoken could you please try reproducing this on a Mac? I can't seem to be able to do that on Windows. I've dragged this selected portion (as described in the report) around a lot and ... nothing.

@Gasparoken
Copy link
Member

Hi @iamOgunyinka. Yes, I was able to reproduce it in MacOS and Windows. Only in the beta version.

@dacap dacap modified the milestones: v1.3-beta12, v1.3-beta13 Mar 14, 2022
@dacap dacap assigned dacap and unassigned iamOgunyinka Apr 7, 2022
@dacap dacap modified the milestones: v1.3-beta15, v1.3.0 Apr 7, 2022
@Gasparoken Gasparoken added the wip label Jul 11, 2022
@Gasparoken Gasparoken self-assigned this Jul 11, 2022
@dacap dacap removed their assignment Jul 13, 2022
Gasparoken added a commit to aseprite/laf that referenced this issue Jul 13, 2022
This 'floor' function is useful to adjust x, y float coordinates to the _left most near integer_ for x, and _top most near integer_ for y (instead of rounding towards 0).
This function was included to solve issue aseprite/aseprite#2891

Example of use:
```
gfx::RectF boundsF(-0.25, -0.75, 1, 2);
gfx::Rect bounds = boundsF.floor();
bounds = (-1, -1, 1, 2)
```
When 'floor' is not used:
```
gfx::RectF boundsF(-0.25, -0.75, 1, 2);
gfx::Rect bounds = boundsF;
bounds = (0, 0, 1, 2)
```
Gasparoken added a commit that referenced this issue Jul 13, 2022
…right over left canvas edge with Ctrl still pressed #2891

Prior to this fix, moving a marquee selection while holding down the Ctrl key outside the left/top area of the canvas results in a 1px distortion of the marquee image. This distortion is due to a false transformation when it is required to get the corner bounds, due to rounding the float coordinates towards 0 instead of the nearest left/top integer. The discrepancy occurs within the `getDraggedImageCopy`, `redrawExtraImage`, `drawImage` and `drawMask` functions.
@Gasparoken Gasparoken removed the wip label Jul 13, 2022
dacap pushed a commit to aseprite/laf that referenced this issue Jul 13, 2022
This 'floor' function is useful to adjust x/y floating-point
coordinates to the left most/top most near integer
respectively (instead of rounding towards zero).

Included to solve aseprite/aseprite#2891
dacap pushed a commit to dacap/aseprite that referenced this issue Jul 14, 2022
…right over left canvas edge with Ctrl still pressed aseprite#2891

Prior to this fix, moving a marquee selection while holding down the Ctrl key outside the left/top area of the canvas results in a 1px distortion of the marquee image. This distortion is due to a false transformation when it is required to get the corner bounds, due to rounding the float coordinates towards 0 instead of the nearest left/top integer. The discrepancy occurs within the `getDraggedImageCopy`, `redrawExtraImage`, `drawImage` and `drawMask` functions.
@dacap dacap closed this as completed Jul 18, 2022
@dacap dacap modified the milestones: v1.3.0, v1.3-beta17 Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment