HaikuArchives / ArtPaint

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

StraightLineTool: added "use current brush" option #507

Closed dsizzle closed 1 year ago

dsizzle commented 1 year ago

also made line drawing "live" so you can see the actual line as you draw it with the appropriate color (or brush). There can be a slight artifact sometimes with the "adjustable width" option

humdingerb commented 1 year ago

There can be a slight artifact sometimes with the "adjustable width" option

That's the line becoming a triangle sometimes, right? Seems to happen when the the adjustable width crosses from ca. +1 pixel to -1 pixel, if you nkow what I mean. Possibly when it's 0? If you click at that stage, it actually draws a triangle.

I notice that the preview-line when using "Adjustable width" is drawn with the disabled slider's width. If that's rather large, say 30 pixels, and you MouseUp the first time to set the endpoint, the line width jumps back to 1pixel when you start to adjust the line width. Wouldn't it be nicer to always do the preview with 1 or 2 pixel width when we're in "Adjustable width"-mode?

Most important though: Things are going haywire when the zoom level isn't 100%... :)

dsizzle commented 1 year ago

This is why I didn't do straight line right away...it's different enough to be a pain.

Also I haven't been feeling well for the last week...I prob shouldn't code when I'm ill. :laughing:

Anyway, latest update works great unless you use the scroll wheel while adjusting the size. :frowning_face:

humdingerb commented 1 year ago

Feverish coding can have interesting results... :)

Yes, changing zoom while adjusting width wrecks havoc. Same with ALT+/-, of course. As usual, you tell me when we're ready to merge (the first iteration). The "don't zoom while adjusting width" may be a limitation we could live with...

dsizzle commented 1 year ago

btw, I discovered the master version doesn't play nice if you zoom while resizing either. :(

humdingerb commented 1 year ago

See, nobody noticed. Well, that or people learned what happens when they zoom in the middle of line-drawing, but didn't report it... :)

dsizzle commented 1 year ago

ok, I think I have defeated the artifacts and haywires(?) - please give it a try when you have a chance.

humdingerb commented 1 year ago

Very nice, works perfectly now! Thanks!

dsizzle commented 1 year ago

Part of #202