Skip to content
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

Resize canvas #12

Open
andraantariksa opened this issue Nov 16, 2019 · 3 comments
Open

Resize canvas #12

andraantariksa opened this issue Nov 16, 2019 · 3 comments

Comments

@andraantariksa
Copy link

andraantariksa commented Nov 16, 2019

I think it would be a good idea to have a resizeable canvas (to shrink and to grow the canvas size)

@sol-vin
Copy link
Member

sol-vin commented Nov 16, 2019

Needs more than just a title to be an accepted issue.

@sol-vin sol-vin closed this as completed Nov 16, 2019
@andraantariksa
Copy link
Author

I have edit the issue

@l3kn l3kn reopened this Nov 17, 2019
@l3kn
Copy link
Collaborator

l3kn commented Nov 17, 2019

@andraantariksa Do you have an idea how the API for this could look like?

Due to the way pixels are stored, a mutating (changing the canvas it is called on) version of this is hard to implement.

The existing function Canvas.paste(canvas, x, y) can be used to insert a smaller canvas into a larger one.
A Canvas.cut(x, y, width, height) : Canvas function would be a nice addition, as a more flexible way to shrink a canvas.

@redcodefinal what do you think about that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants