Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the rectangular selection tool #56

Closed
Tracked by #365
novhack opened this issue Dec 16, 2019 · 5 comments
Closed
Tracked by #365

Improve the rectangular selection tool #56

novhack opened this issue Dec 16, 2019 · 5 comments
Labels
change Proposes changes on how something works enhancement New feature or request

Comments

@novhack
Copy link
Contributor

novhack commented Dec 16, 2019

Right now it's possible to move selected pixels with a shift button but it would be nice to be able to copy the selection with a ctrl button too.

@OverloadedOrama
Copy link
Member

You can already copy selections with Ctrl-C, and paste them with Ctrl-V. Although I think we need to make it more apparent for users because this functionality is quite hidden as for right now.

@novhack
Copy link
Contributor Author

novhack commented Dec 16, 2019

Some other programs indicate it by animating the selection rectangle (slowly rotating dashed line). Since the selection rectangle is a 2D polygon maybe that could be done with a shader?
But I still think that allowing fast copy/paste when fast move is available would not be bad for workflow.

@novhack
Copy link
Contributor Author

novhack commented Mar 11, 2020

Today someone came to Discord and was a little confused on how selection in Pixelorama works so I did a little research in a few desktop pixel art programs and this is how they behave. I unfortunately don't have ProMotion on this machine but I might add it eventually. I have thrown MSPaint in because that is what 99% of people who ever used Windows used at least once.

Glossary:

Just to be sure we understand each other...
Selection - rectangular bordered area created with the selection tool by Click + drag over the canvas
Selected - part of the canvas bordered by the selection

Pyxel Edit:

  • selecting doesn't add resize/rotation gizmos - only added on paste and when movement starts - rotation starts when clicked and dragged near the corners of selection
  • Click + movement moves only selection
  • Ctr + Click + movement cuts selected and moves it with selection
  • Shift + Click + movement creates a new selection and merges it with already existing one - if gizmos are present same as Ctrl + movement
  • Alt + Click + movement creates a new selection and subtracts it from already existing one - if gizmos are present moves selection with selected preview and automatically pastes selected when mouse is released
  • Ctrl+C/Ctrl+V creates a movable selection with selected preview, on consecutive Ctrl+V draws selected to canvas (selection is kept at the same position)

Aseprite:

  • every selection adds resize/rotation gizmos - rotation behaviour is the same as in Pyxel Edit
  • when selection exists creating another selection with a right mouse click subtracts from it
  • Click + movement cuts selected and moves it with selection
  • Ctr + Click + movement moves selection with selected preview and automatically draws selected to canvas when mouse is released
  • Shift + Click + movement creates a new selection and merges it with already existing one
  • Alt + Click + movement always activates color picker - non-selection feature
  • Ctrl+C/Ctrl+V creates a movable selection with selected preview, on consecutive Ctrl+V draws selected to canvas (on paste selection moves back to the position of the original copy)

Graphics Gale:

  • resize gizmos added on every selection - rotation gizmo is a line from the center of selection with a draggable end that controls rotation
  • only program where left clicking out of selection doesn't remove selection - right click outside does it
  • cursor has vertical and horizontal line gizmos
  • Click + movement cuts selected and moves it with selection
  • Ctr + Click + movement moves the canvas in the window (non-selection feature)
  • Shift + Click + movement same as Click + movement but locks movement to X and Y of the center of the original selection position
  • Alt + Click + movement same as Click + movement
  • Ctrl+C/Ctrl+V same as Pyxel Edit

MS Paint:

  • resize gizmos added on every selection, no rotation
  • Click + movement cuts selected and moves it with selection
  • Ctr + Click + movement moves selection with selected preview, draws selected to canvas on mouse release
  • Shift + Click + movement Windows XP Solitaire game won effect... a nice nostalgic throwback but an unusable feature
  • Alt + Click + movement same as Click + movement
  • Ctrl+C/Ctrl+V creates selection with selected preview at (0,0) position, on consecutive Ctr+V creates another selection at (0,0) and draws the previous one to canvas

Pixelorama 0.6

  • resize/rotation gizmos are not yet implemented
  • Click + movement moves only selection
  • Ctr + Click + movement same as Click + movement
  • Shift + Click + movement cuts selected and moves it with selection
  • Alt + Click + movement same as Click + movement
  • Ctrl+C/Ctrl+V allows to move selection and draw copy of selected to the canvas (no preview), copy data is lost when selection is removed by clicking outside of it

Suggestions

I think that the base for selection behaviour in Pixelorama is solid but I have compiled a list of proposed behaviour from what I learned from other programs:

  • Left click outside removes selection (ESC could too). Left click + movement creates a new selection.

  • Left click + Shift + movement outside adds to the current selection if the new selection connects with it. Left click + Ctrl + movement subtracts from selection if new and current overlap.

  • Holding Shift toggles on resize/rotate gizmos. When manipulating selection with gizmos Shift can be released but gizmos will remain present until the mouse is released.

  • Shift + movement cuts the selected area and moves the selection, Shift can be released, selected area is drawn to canvas on mouse release (current behaviour). Since Shift is being held it shows resize/rotate gizmos while moving the selection (thus indicating destructive operation).

  • Ctrl + movement moves selection with a preview of the selected area, on mouse release it draws the preview to canvas.

  • Ctrl+C keeps the copied selection even after de-selection. Current behaviour after paste remains the same - if the selection is not deselected but moved Ctr-V pastes on it's position. But if it was de-selected Ctr-V re-creates the copied selection on it's original position.

  • I would avoid any combination with Alt since it reserved for windows manipulation in basically all X11 based desktop environments.

The main three additions in my proposal are then:

  1. Use Left click + movement outside to add to/subtract from already existing selection if the new and current selections overlap (once there is support for non-rectangular selections).
  2. Show gizmos when Shift is being held to indicate that the selected area will be destructively affected. This feature could be potentially reversible in preferences to not show gizmos when Shift is held - that might be better default for new users that used more "traditional" programs before.
  3. Keep the selection copied with Ctr-C even after de-selection.

These are of course just suggestions but I have spent multiple hours thinking about this and this is the most consistent, full featured, solution I came up with.

Oh and I love the vertical/horizontal line gizmos in Graphics Gale... they really make it easier to align the selection. Maybe we could "borrow" that. 😄

@Calinou
Copy link
Contributor

Calinou commented Mar 11, 2020

Speaking of selection features, Photoshop also lets you drag a selection while you're creating the initial rectangle by holding Space and moving the mouse. This is pretty handy when you need to adjust your selection's initial corner without releasing the mouse button.

@OverloadedOrama OverloadedOrama added the enhancement New feature or request label Mar 22, 2020
@OverloadedOrama OverloadedOrama added the change Proposes changes on how something works label Apr 16, 2020
@OverloadedOrama OverloadedOrama added this to To do in Pixelorama v0.9.x via automation Apr 24, 2020
@OverloadedOrama OverloadedOrama changed the title Feature: Rectangular selection copy Improve the rectangular selection tool Jul 20, 2020
OverloadedOrama added a commit that referenced this issue Jul 20, 2020
…xels

This will allow us to create more selection tools in the future, that aren't necessarily rectangular (See #129) and even enhance the current rectangle selection tool (See #56)

Current issues spotted so far:
Drawing is slower for large images, and bucket filling is also considerably slower even on a 64x64 image. Optimizations are required.
@novhack novhack mentioned this issue Oct 23, 2020
25 tasks
@OverloadedOrama
Copy link
Member

Closing this issue to continue the discussion on #129 :)

Pixelorama v0.9.x automation moved this from To do to Done Jan 8, 2021
@OverloadedOrama OverloadedOrama removed this from Done in Pixelorama v0.9.x Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change Proposes changes on how something works enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants