SoK/2023/StatusReport/Brannon Aw

From KDE Community Wiki

Brannon Aw's status report for Season of KDE 2023

Introduction

Spectacle: Improving the annotation tools (Slot filled)

Project type: Coding

Brief explanation:

Spectacle has a limited annotation tool that allows users to make quick edits to a screenshot. Currently it lacks an eraser tool that can delete pen annotations quickly and is instead relying on the select tool to delete markups which would be especially inconvenient for removing the many strokes in handwriting. It also lacks an option to cancel all annotations should the user change his mind. It could also use a cropping option should the user decide to make additional edits to an already selected region. Additional improvements that could be implemented include an option to draw splines, polygons, more regular shapes, and perhaps even accuracy options when approximating pen strokes. These features can be modelled after other drawing software like Krita, PaintDotNet, OpenToonz and Window’s Snipping Tool.

Expected results: A more feature-rich Spectacle for intuitive and convenient screenshotting and annotating comparable to that of Window’s Snipping Tool.

Knowledge Prerequisite: C++, Qt, QML knowledge (or willingness to learn)

Mentor: Bharadwaj Raju @bharadwaj-raju:kde.org on Matrix

Design documents

UML sequence diagram for eraser tool
Rough sketch of sequence diagram for eraser tool

Videos

Videos cannot be displayed on the wiki? So now they are just links to a video. Meanwhile, here are some GIFs of the videos instead:

Video showing the selection and deletion of annotations on a screenshot in Spectacle.
Previously, to delete annotations, one needed to select and then press the "delete" key, which would prove tedious when trying to delete handwritting.

File:SoK 2023 - Spectacle select and delete.webm

Video showing eraser tool erasing annotations in Spectacle.
Demonstration video of erasing annotations on screenshot.

File:SoK 2023 - Spectacle eraser demo.webm

Video showing the undoing of the erased annotations on the screnshot in Spectacle.
Pressing the undo button (Ctrl+Z) will undo each erased annotation.

File:SoK 2023 - Spectacle undo eraser actions.webm

Video showing clearing annotation in Spectacle, and then drawing on it again.
Clearing all annotations currently present on the screen, and allowing a new set of annotations to be drawn.

File:SoK 2023 - Spectacle clear annotations.webm

Video showing clearing all annotation in Spectacle.
The clear annotations button also works when annotating in the rectangular region screenshot mode.

File:SoK 2023 - Spectacle clear annotations in rectangular mode.webm

Commits

Eraser tool

Merge request: link

Possible improvements to make:

  • Undo all erased in a single stroke, rather than undoing each erased action one by one.
  • Fix inability to erase/select single point freehand annotations without needing to add an ellipse to a start of the stroke.
  • Change cursor icon when hovering over an erasable annotation (suggested here)
  • Compatibility patches for integration with other tools due to the changing of freehand annotations' selectable geometry (suggested here)

Clear all annotations

Merge request: link

Possible improvements to make:

  • Fix error binding loop error messages (mentioned here
  • Find a more appropriate location for the "clear all annotations" button that is not in the toolbar with the other annotation tools.

Blog posts

Here I document my thought processes throughout the project in great detail: https://brennanzuz.github.io/SoK-2023-documents/BlogPosts.html