Spade-Editor / Spade

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

Matrix transformations to the image #68

Open HeroesGrave opened 10 years ago

HeroesGrave commented 10 years ago

More matrix fun!

Simply, transform the image (or rather, the selection) with a matrix. Makes most of the image operations much simpler from our view (rotate, flip, scale).

Allow the user to input a custom matrix to do weird/evil things of their own.

Question: Can it be done with a 3x3 matrix, or will we need a full 4x4 even though we're only in 2D

I think this probably could belong under imageops rather than effects.

BurntPizza commented 10 years ago

Could have an Op called 'Matrix', and simply select between transform and blend.

HeroesGrave commented 10 years ago

The problem is that blend modes are stored as part of the layer, and so can't be easily used as an image op. :(

BurntPizza commented 10 years ago

Sounds like a class hierarchy design flaw, but then again I haven't studied that part of the codebase too much yet.

HeroesGrave commented 10 years ago

It was done intentionally to allow future versions to save the blend mode with the layer, and to let you see what it will look like blended before (or without) merging.

BurntPizza commented 10 years ago

I have to sleep soon, so I'll just ask instead of going and trying to figure it out for a while: does an ImageOp on the global layer (Background) propagate upwards through it'd child layers? More abstract, does any child layer inherit ops from its parent(s)? I think they should if they don't.

Longor1996 commented 10 years ago

No, they don't do that. Why should they? I don't think that would be a good idea.

HeroesGrave commented 10 years ago

The only image operations that should be affecting other layers are resize (and in the future, rotate by 90/180/-90 degrees) because the layer dimensions need to be in sync.