drawing icon indicating copy to clipboard operation
drawing copied to clipboard

Support for editing drawn shapes afterwards

Open ripefig opened this issue 6 years ago • 8 comments

Seems like every drawing app should have this, so you can arrange stuff on the canvas. The main way to do that is to implement support for layers, although you could also do what Google drawing does and basically make every shape its own layers.


Edit from @maoschanz to get a checklist visible from the issues list

The history manager should get new methods:

  • [ ] start_last_op_correction()
    • [ ] it switches to the related tool
    • [ ] maybe puts a blue "selection-mode" css on the headerbar (the corresponding method will not be implemented by all DrDecoManagers)?
    • [ ] maybe it locks any attempt to add operations to history?
    • [ ] at least it disables undo/redo
    • [ ] it tells DrImage to redirect the mouse inputs to a special method of the active tool
      • [ ] it draws handles on the path's vertex, if any
      • [ ] the handles can be moved using the mouse
  • [ ] apply_last_op_correction()
    • [ ] restores the editor in its normal state
    • [ ] rebuilds the image using the corrected values for the operation
  • [ ] cancel_last_op_correction()
    • [ ] restores the editor in its normal state
    • [ ] rebuilds the image using the preexisting values for the operation

In the UI:

  • [ ] the button has error-correct-symbolic as its icon
  • [ ] when the correction mode is active, its button changes to whatever icon i use as "apply"
  • [ ] maybe the entire history box should be replaced, to get a button "cancel" too
  • [ ] switching tabs, or closing a tab, or switching tool, or whatever attempt to break the workflow, will call cancel_last_op_correction()

At this point, only the last one is editable. To make any operation editable, which is a debatable idea in terms of UX, the following modifications should be done:

  • [ ] the button opens a dialog with a list of all operations. It smells like shit because i don't have any labels to put in such an UI. The states might not be pertinent to edit, but i like the idea of at least an editable initial state
    • [ ] clicking on an operation undoes until the targeted operation, so it can be edited, and then the following operations are redone. This looks like bad UX?
    • [ ] the content of the edited op has to be loaded by the options manager (e.g. setting the width of the line to correct as the content of the spinbutton entry)

I probably forgot some edge cases regarding the abstract selection's numerous possible operations.

ripefig avatar Nov 27 '19 15:11 ripefig

The main way to do that is to implement support for layers

not really 😁 all the shapes and lines are already in the history, and editing some coordinates already stored (probably what Google Drawing does even if i've never tested it) requires far less memory than compositing dozens of actual layers. Layers are cool, powerful and technically "easy" to do but i'm not here to challenge Photoshop or G(l)imp(se), this is more a clone of Microsoft Paint or KolourPaint. I wouldn't even know how to put the layers management controls in the UI

every drawing app should have this

it's a feature i want to eventually provide, but KolourPaint, XPaint, gPaint, and Wine's MS Paint don't provide it at all so i don't feel like it's really lacking. I mean, it could be here, but its absence doesn't make the app unusable, it'll happen but it's not a priority

maoschanz avatar Nov 27 '19 20:11 maoschanz

Those apps are not unusable but they have a feature set from 1980s. If you look at new applications they all allow you to reposition objects on canvas, in increasingly efficient ways. Nobody would use Google Draw if it didn't allow you to that, or at least I certainly wouldn't.

ripefig avatar Nov 28 '19 08:11 ripefig

every drawing app should have this

it's a feature i want to eventually provide, but KolourPaint, XPaint, gPaint, and Wine's MS Paint don't provide it at all so i don't feel like it's really lacking. I mean, it could be here, but its absence doesn't make the app unusable, it'll happen but it's not a priority

Right, personaly i love this simple app to edit screenshots and explain things to others by writing on it with my pen wacom. Layers should be a big feature. But the first needed is : fast to open !! Krita is great but too slow.

zzzazzz avatar Mar 09 '21 10:03 zzzazzz

Layers should be a big feature.

But this is not the topic of this issue...?

maoschanz avatar Mar 09 '21 10:03 maoschanz

Layers should be a big feature.

But this is not the topic of this issue...?

Of course ! right :+1: :)

zzzazzz avatar Mar 09 '21 13:03 zzzazzz

Just passing by. I know the shutter project has this. Might be worth checking how it is done there. I also wonder (I am not knowledgeable here) if the solution could be a two-layers based app (two and only two layers, no layers management whatsoever). Workflow would be:

  1. Import picture
  2. At import, Drawing automatically creates a second layer
  3. All edits are done in that second layer,

Point 3. means that we could use the "Rectangle selection" to move things around.

This is basically what I do in KolourPaint, Pinta etc : I always create a second layer before any edits. Potentially automating that at image import is the easy solution.

Just some thoughts! Many thanks for this great app :)

mbousq avatar Apr 10 '22 17:04 mbousq

why do you keep talking about layers? i already said it's not the topic

The checklist with everything to do is already written, i just fix issues one by one, and this one isn't top priority yet.

we could use the "Rectangle selection" to move things around

it's not about moving things, it's about editing them.

the user, with the "shape" tool, has drawn a blue rectangle with a 4px line width, and now they think it would look better if it were an orange ellipsis with a 3px line width. The tool they'll use to edit that shape has to provide all the parameters and options the "shape" tool provided when the user drew their original circle: this tool is quite obviously the "shape" tool itself.

maoschanz avatar Apr 10 '22 17:04 maoschanz

why do you keep talking about layers? i already said it's not the topic

it's not about moving things, it's about editing them.

Apologies, I was confused by the first paragraph of the Author. Probably others as well:

Seems like every drawing app should have this, so you can arrange stuff on the canvas. The main way to do that is to implement support for layers, although you could also do what Google drawing does and basically make every shape its own layers.

mbousq avatar Apr 10 '22 18:04 mbousq