HaikuArchives / ArtPaint

ArtPaint is a painting and image processing program.
https://haikuarchives.github.io/ArtPaint/
29 stars 18 forks source link

Jumping brush size in preview panel when rotating #523

Closed humdingerb closed 11 months ago

humdingerb commented 1 year ago

As mentioned in #522. Create a brush that just fits diagonally into the preview pane:

screenshot1

Then slowly move the Angle slider: As old Pythagoras found out recently, applying his groundbreaking work on hypotenuses, the diagonal of a square often is longer than its sides. This forces the scale to adjust to make the brush fit, but also shrinks the brush preview:

screenshot2

humdingerb commented 1 year ago

From @dsizzle at #522

btw, I watched the video, and it's not really a bug as such - the thing is that when you rotate the brush, at certain angles it's wider/taller than the current preview. The way the code works is that it scales down by multiples of 2 when the brush width or height exceeds the bounds of the preview square. To "fix" it would require scaling down the preview smaller than it needs to be, just so that the extreme angles would always fit. I'm not sure that's a positive.

I think I'd prefer not using all available space in the pane to changing scale when rotating.

humdingerb commented 1 year ago

One more thing: Obviously, the brush pane in the status bar of the main window shows the same phenomenon. It being smaller than the pane in the Brushes window, the issue manifests at a different brush size. If there is a solution and you decide it's worth implementing, all panes may have to be the same size after all...