stumpy_core icon indicating copy to clipboard operation
stumpy_core copied to clipboard

Resize canvas

Open andraantariksa opened this issue 6 years ago • 3 comments

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

andraantariksa avatar Nov 16 '19 10:11 andraantariksa

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

sol-vin avatar Nov 16 '19 18:11 sol-vin

I have edit the issue

andraantariksa avatar Nov 17 '19 01:11 andraantariksa

@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?

l3kn avatar Nov 17 '19 09:11 l3kn