Skip to content

Moving outside canvas with rectangle selection crops the image. #38

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
azagaya opened this issue Dec 14, 2019 · 2 comments
Closed

Moving outside canvas with rectangle selection crops the image. #38

azagaya opened this issue Dec 14, 2019 · 2 comments
Labels
change Proposes changes on how something works

Comments

@azagaya
Copy link
Contributor

azagaya commented Dec 14, 2019

Hi,
Selecting some part of a drawing and moving it outside canvas, crops the image.
Other pixel art tools don't show this behaviour, so i think it would be nice not to cropping the image when outside canvas.
Perhaps the image itself should be bigger (or grow) and the viewport of the selected resolution.

If this is wanted, and i get some guidelines of where to look, i could give this change a try.

@OverloadedOrama
Copy link
Member

Hello! I didn't reply here because we were talking on Discord about this, but I'll reply here too in case anyone else wants to give it a try too. The code of the rectangle selection is scattered in 2 places, Canvas.gd under _process() and in SelectionRectangle.gd. SelectionRectangle.gd is where the problem can be fixed, most likely.

The problem is that if you take a selection and move it outside the canvas and then drag it back, all pixels would be black. So to combat this, I made the pixels invisible instead. I'll try to give it a shot in solving this some time in the future, but feel free to contribute as well!

@OverloadedOrama OverloadedOrama added the change Proposes changes on how something works label Apr 16, 2020
@novhack
Copy link
Contributor

novhack commented Dec 6, 2021

I would consider this issues resolved.
In pre-0.9 versions every selection move was immediately committed - this behaviour is described in this issue.
Since v0.9 a selected pixels can be freely moved around until the movement is committed by the user by deselecting or Enter is pressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change Proposes changes on how something works
Projects
None yet
Development

No branches or pull requests

3 participants