ladybird/Base
Timothy Slater 038a833f0c PixelPaint: Add Polygonal Select Tool
Polygonal selection tool allows for the drawing of any arbitrary
polygonal shape. It tracks clicked points in a vector, upon double
clicking we finalize the polygon and generate the selection mask. The
user can press the escape key during selection to cancel.

The mask is generated as follows:

- First we calculate the size of the bounding rect needed to hold the
  polygon
- We add 2 pixels to height/width to allow us a 1 pixel border, the
  polygon will be centered in this bitmap
- Draw the polygon into the bitmap via Gfx::Painter, making sure to
  connect final polygon point to the first to ensure an enclosed shape
- Generate a selection mask the size of the bitmap, with all pixels
  initially selected
- Perform a flood fill from (0,0) which is guaranteed to be outside the
  polygon
- For every pixel reached by the flood fill, we clear the selected pixel
  from the selection mask
- Finally we merge the selection mask like other selection tools.
2022-10-19 23:04:07 +02:00
..
bin Userland: Add more(1) emulation to less(1) 2021-07-07 20:01:15 +04:30
etc Base: Launch CrashDaemon at session start-up 2022-10-14 11:37:11 +02:00
home/anon Base: Add a PDF document to test Adobe Type 1 font rendering 2022-10-16 17:44:54 +02:00
res PixelPaint: Add Polygonal Select Tool 2022-10-19 23:04:07 +02:00
root Base: Remove TelnetServer and WebServer from the generated manpage list 2022-02-28 20:30:35 +02:00
usr Base: Remove /proc/devices node 2022-10-16 02:24:43 -06:00
www Base: Improve default WebServer pages 2022-02-23 21:28:17 +00:00
.gitignore Meta: Don't generate emoji.txt into the source tree 2022-09-05 09:50:31 -04:00