Spade-Editor / Spade

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

Revamping the way selection works #117

Open SuperDisk opened 9 years ago

SuperDisk commented 9 years ago

Having just an array of selected pixels makes for a rough time when you want to, for example, resize or rotate; Paint.NET handles this with a list of "ROIs" or Rectangles of Interest. This is probably the better solution.

HeroesGrave commented 9 years ago

I'm curious as to what some of the problems are with the current system.

SuperDisk commented 9 years ago

It involves much more calculation to transform an array of booleans. For instance, trying to rotate a simple square of 512x512 would involve crunching 512^2 = 262144 numbers to find a new position for each pixel. With a rectangle of interest, it's 4 points.

Also, say you select a small area, 25x25 and rotate it 45 degrees. When you scale it up, using the current boolean method, it would be very, very pixelated and the edges would be most jagged. You can't really see this because currently there isn't any rotation.

You can pretty much just google "vector vs bitmap," except in this case it's for selections.

BurntPizza commented 9 years ago

You can't really see this because currently there isn't any rotation.

I think this is primarily why it currently is like it is. There aren't any high level feature yet, so the API is still low level. But yes, I would like to see vector/polygon based selection, although there are more pressing needs currently. Feel free to start a sketch for APis etc.