drawpile / Drawpile

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

FR: Paste as layer #1304

Closed gerroon closed 2 months ago

gerroon commented 2 months ago

Hi It would be nice if there is a function to paste the clipboard as a new layer above the current layer. this would cut down some clicks and friction.

Thanks

askmeaboutlo0m commented 2 months ago

Pasting as a layer doesn't make too much sense conceptually.

It can't create a layer immediately and just put the pasted image on it because you don't know where the image will go and possibly not even how large it would be. So this would potentially cause you to paste a ginormous image all across the canvas, disrupting other users.

The alternative would be to not immediately "let go" of the pasted image and instead leave it floating so that you can edit its size and position, but then it would really just be creating a blank layer. Which would not work sensibly with undos and would be left behind if you canceled the selection.

A more sensible implementation would be as described in #1266: showing selections in the layer list and letting you turn that selection into a layer, similar to how e.g. GIMP does it.

gerroon commented 2 months ago

How is this any different from manually creating a new layer and pasting it? Instead of two it could be merged as one step. Krita pastes as a new layer by default.

askmeaboutlo0m commented 2 months ago

Krita is not a collaborative drawing program. For it, it is acceptable to paste a giant image that covers the canvas because you can just scale it smaller afterwards. For Drawpile, that would disrupt everyone else in the session, so it must not put pasted images on the canvas without letting you adjust them first.

gerroon commented 2 months ago

Why do you assume that the pasted image is going to be massive or giant? Also not everyone would be using it as colab app, I use it as my sketching app for instance.

Like I said, I do not see how it is different from pasting, we already have the paste (Ctrl-V) option. It is just an FR, not insisting that it should work or should be implemented.

askmeaboutlo0m commented 2 months ago

Depending on where you copied the image from, you don't know how large the image is going to be compared to the canvas or where it's going to be placed exactly. It being large or end in a spot where it disrupts other users is a possibility that needs to be accounted for, which the Krita way of spawning a layer does not.

The way it's different from from the existing paste operation is that it just puts a floating image on the canvas, which is only visible to you. You can scale and move it around freely, no one else will see it or be affected by it and it won't make the session history larger. Only when you apply the transform does the image actually get pasted into the canvas and other users see it appearing in that final state.

Drawpile is a collaborative drawing program first and foremost, so features that don't fit into that environment are going to have a hard time being considered. Especially in a case like this where there's a different way of implementing it that actually works in multiplayer.

gerroon commented 2 months ago

Ok that makes sense, thanks for consideration.