Skip to content

Conversation

@Keschler
Copy link
Contributor

Creates a new type of brush: Highlighter

Addresses: #449

I added a new Highlighter brush designed for highlighting text on PDFs or notes. It features a pipeline to handle transparency correctly and includes an auto-straightening helper for cleaner lines.

Technical Implementation:

  • New Layering: Added a PDFHighlighter layer to StrokeLayer
  • Auto-Straighten: Added logic to detect roughly straight strokes and replace them with a single straight line automatically.

To fix Alpha-Accumulation

  1. Stroke is first drawn at 100% opacity
  2. Once the stroke is rasterized into an image, the alpha is applied

Demo:
Highlighter rnote

Disclaimer: This implementation was primarily generated with the assistance of GitHub Copilot.

@Keschler
Copy link
Contributor Author

Keschler commented Dec 3, 2025

I just realized a similar highlighter exists #1210, but my implementation still seems useful, because it is easier to find and usable as a pen instead of a shape.

An useful addition could be to modify the transparency/opacity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant