Painting improvements #1267
@scribblemaniac First off, thank you for taking the time to work on this! Although I'm not sure I understand the first GIF, does this mean we can now paint with alpha as well as erase? if we can use fully transparent alpha values we can for example, use the fill tool to color a shape and replace the currently solid color instead of painting over it. Or is that a totally different thing?
If it is a different thing, could that idea be considered a blending mode then? Don't know if you're familiar with Blender's Add Alpha / Erase Alpha blending modes for example, where adding alpha makes the color fully transparent (but somehow it keeps the color instead of erase it) and erasing alpha makes the color fully opaque (modified by pressure of course) so the color is revealed.
Since we're using PNG under the hood and PNG's use straight alpha (that means the color comes RGBA'd instead of premultiplied through transparency masks), we should be able to use that where the color itself is transparent, this of course would count as part of the surface bounding box.
Also is the second GIF what I think it is? could we finally get a way to paint behind the lines? if so that would honestly be a most desired feature!!! and it would also solve a LOT of issues for users have when coloring in the same layer (i.e white halos and incomplete fills due to threshold with anti-aliased strokes)
If we couple this with the upcoming coloring features, Pencil2D users will seriously have no need to use other programs the coloring workflow.
Basically I think this GIF is appropriate for your PR's
That's a different thing by the sounds of it, although maybe you could think of the eraser tool as working that way if you wanted. The first gif is of the eraser tool. There's a layer of red, and then a layer with the text below. The red is being erased in real-time, rather than after you finish your stroke. Painting with alpha will add the color on top of the canvas like before. A sort of "clear mode" for the bucket fill was possible before this and is possible after too, it just needs to use a different composition mode.
Again, not really. There are no changes to the tools in this, only in how the are rendered while in use. So you can paint behind lines, but you will need to be on a lower layer, just like right now. The difference is that now you can actually see what you're doing
The Add/Erase Alpha and drawing behind lines on the same layer should both be possible with different blending modes for the brushes.
I appreciate the enthusiasm
The polyline tool was not correctly displaying while drawing. This was probably broken by the changes to the frane caching in pencil2d#1267. I also did a little bit of refactoring to implement this more cleanly. Tools now report if they are modifying the canvas with isActive, rather than ScribbleArea trying to figure that out. I also changed the right click action to set the temporary tool to the hand tool rather than forwarding move event to the hand tool. This is the same way that the middle mouse button works and is slightly better because it will show the hand tool cursor.