-
Notifications
You must be signed in to change notification settings - Fork 19
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
Crop/Scale Canvas Maniplators: fixed off-by-1 errors #630
Conversation
Crash when invoking Canvas|Resize... twice without changing anything but confirming both times with "OK" button: No crash when cropping twice. Otherwise it does indeed seem to fix the cropping one-off.
And the result is 3 pixels wider. |
8fd857d
to
3a16fe0
Compare
I fixed the weird shearing - and it seems to correctly only expand by 1 pixel in width. Still looking into the crash. Seems like it's related to trying to change the size when clicking Ok instead of not doing anything. |
3a16fe0
to
ba68b97
Compare
I think I fixed the crash as well - but I will try to test more. |
Looks good! Can you remind me why there's a "Left" and "Top" in the Resize panel? For cropping, it works - it de/increases the canvas size. For resizing it does nothing. |
Honestly I don’t recall. I think it was just for consistency. But yeah, I guess it is kinda pointless. Even if it worked as you suggested, it’s no different from decreasing the width or height. |
True. At max. it saves you from mental arithmatic when having to subtract, say 283 from 1292 for the new width. |
Ok, after sleeping on it, I think I remember why we have the Left/Top - it's simply because of the resize box. So when you move the upper left handle, it does behave as you describe. Anyway, since this seems to have fixed the original issue, I'll go ahead and merge it later. |
👍 |
merged! |
New fix for #552 - now you can crop to 1x1 and it's actually 1x1, and I believe other crops are accurate too.
Also fixed Canvas->Resize since it's kind of the same thing (and had the same problem).
I didn't mess with Edit->Scale; I think it's also off by 1 but it's a lot hairier in general.