Spade-Editor / Spade

Cross-platform raster graphics editor inspired by Paint.NET
GNU General Public License v3.0
41 stars 10 forks source link

Reimplement functions that change image dimensions #25

Closed HeroesGrave closed 10 years ago

HeroesGrave commented 10 years ago

The new drawing system currently doesn't allow changing image dimensions.

I'll have to think of a workaround.

Longor1996 commented 10 years ago

This should be easy to do!

You just need to implement a recursive method, that goes trough ALL the Canvas'es, and changes their image dimensions. Then after that you just need to repaint using CanvasRenderer.

HeroesGrave commented 10 years ago

But how do we redo/undo it?

That's the part I'm stuck at.

Say the history goes like this.

What do we do there?

Obviously we can't undo the resize without undoing it on all of the canvases, but if we undo it for all the canvases, what happens if Canvas A has a lot of changes?

HeroesGrave commented 10 years ago

So the compromises are:

I think solution A is the best, as with other image editors, you would have to revert all the changes anyway to un-resize the image.

What do you think?

Longor1996 commented 10 years ago

Hm

Options: Revert all the changes on Canvas A until the resize. Make Image dimension operations un-revertable. (A Bad Idea) Open a new image with the new dimensions. (Probably a Bad Idea) Make changes globally again, so that there is only one history.

HeroesGrave commented 10 years ago

Option 1 and 4 have the same result, but option 1 gives more freedom to editing between layers.

Longor1996 commented 10 years ago

How about making two options:

That would be much better I think, but also a 'tiny' bit confusing for starters. (Who said the layer-system is for starters? One has to learn how it works)

HeroesGrave commented 10 years ago

Now that #39 is done this is possible.

I'm going to work on this next.

HeroesGrave commented 10 years ago

This is working for resize.

It's just a matter of reimplementing the rest of the functions and committing.