serenity/Base/res
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
..
apps Base: Mark NetworkSettings as requiring root 2022-10-14 11:23:06 +02:00
color-palettes
cursor-themes
devel/templates
emoji Base: Add more emoji 2022-10-17 01:09:10 +02:00
fonts Base: Add more glyphs 2022-10-14 13:37:29 +02:00
graphics
html Base: Update display grid test page 2022-10-15 16:04:01 +02:00
icons PixelPaint: Add Polygonal Select Tool 2022-10-19 23:04:07 +02:00
js/Spreadsheet
keymaps Keymaps: Improve pt-br keymap 2022-10-02 21:28:55 +02:00
terminal-colors
themes Base: Update Durrque theme for a better look and feel 2022-09-17 10:08:59 +01:00
wallpapers
fortunes.json Base: Fix my mistake 2022-10-14 19:53:17 +01:00
words.txt