drawpile / Drawpile

A collaborative drawing program
http://drawpile.net/
GNU General Public License v3.0
1.01k stars 129 forks source link

Selections: allow drawing on selections as if they were layers #1312

Open askmeaboutlo0m opened 1 month ago

askmeaboutlo0m commented 1 month ago

With #1303, selections are persistent. Under the hood, they're actually a kind of layer, so it'd be technically possible to draw on them.

UI-wise, this would require presenting selections in the layer list, similar to the idea with floating transforms in #1266. It would also need some kind of "selection" blend mode that only pays attention to the alpha channel.

Protocol-wise, this could just be a new command (except on builtin servers, where we'd presumably need some PutImage hacks again), since it doesn't affect anything visible and so doesn't cause desync. Alternatively, it may be possible to hack something by using invalid blend modes, but I don't think that would work for MyPaint brushes. Although maybe there's some other invalid combination we could use for those to keep things compatible without adding a mound of new commands.

This feature doesn't have particularly high priority, since you can turn selections into layers (by using Fill Selection) and vice-versa (by using Layer to Selection) already.

amoruwu commented 1 month ago

08c71ea645aa471e5aff4a1e7aa2519c (1) Huh krita does have this 'selection-pseudo-layer', Maybe it can be used in other things? Such as adding blend modes like in #211 . Just a idea though, since the layer is actually for selection not transformation.