Make it possible to write a selection tool #122

Open
opened 2025-06-30 14:53:57 +02:00 by riki · 1 comment
Owner

This is a tracking issue for the current rakugaki usability benchmark as a Worthy Image Editor (#120).

The goal is to implement a selection brush, which acts and feels like the selection tool in other image editors. It must have the following features:

  • The ability to take a rectangular area and "lift" it off the canvas. This means the area can then be moved around, scaled, or deleted.
    • When there's a selection active, it should be possible to use the usual shortcuts—Esc, Del, Ctrl-C, Ctrl-X, known from other image editors to manipulate the selected part of the image.
  • It should also be possible to paste an image onto the canvas using Ctrl-V, triggering the selection.

My current vision for a selection brush would be the following:

pasteImage: \image, r ->
  editRect r \r' ->
    paint c r'

selectRect \r ->
  c = capture r
  [
	blend Erase (fill #000 r)
	editRect r \r' ->
	  paint c r'
  ]

Tasks that need to be done:

  • #123 selectRect and editRect reticles
  • #31 blend
  • #124 capture and paint
  • TODO tasks for keyboard shortcuts
This is a tracking issue for the current rakugaki usability benchmark as a Worthy Image Editor (#120). The goal is to implement a selection brush, which acts and feels like the selection tool in other image editors. It must have the following features: - The ability to take a rectangular area and "lift" it off the canvas. This means the area can then be moved around, scaled, or deleted. - When there's a selection active, it should be possible to use the usual shortcuts—Esc, Del, Ctrl-C, Ctrl-X, known from other image editors to manipulate the selected part of the image. - It should also be possible to paste an image onto the canvas using Ctrl-V, triggering the selection. My current vision for a selection brush would be the following: ```haku pasteImage: \image, r -> editRect r \r' -> paint c r' selectRect \r -> c = capture r [ blend Erase (fill #000 r) editRect r \r' -> paint c r' ] ``` Tasks that need to be done: - [ ] https://src.liquidev.net/riki/rkgk/issues/123 `selectRect` and `editRect` reticles - [ ] https://src.liquidev.net/riki/rkgk/issues/31 `blend` - [ ] https://src.liquidev.net/riki/rkgk/issues/124 `capture` and `paint` - [ ] TODO tasks for keyboard shortcuts
riki added the
goal
goal/wie
area/frontend
area/haku
labels 2025-06-30 15:04:10 +02:00
Author
Owner

Thinking about keyboard shortcuts: how do we make pasteImage be triggered by a keyboard shortcut globally?

Idea: we gather all brushes with a pasteImage function. Ctrl-V always triggers the built-in selection, but the user may press Ctrl-Shift-V to show a context menu allowing you to pick the brush to paste the image with.

Thinking about keyboard shortcuts: how do we make `pasteImage` be triggered by a keyboard shortcut globally? Idea: we gather all brushes with a `pasteImage` function. Ctrl-V always triggers the built-in selection, but the user may press Ctrl-Shift-V to show a context menu allowing you to pick the brush to paste the image with.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: riki/rkgk#122
No description provided.