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.
This adds two new icons for browser context menu items "Close Other
Tabs" and "Download".
This adds existing icons where they were missing in context menu items.
This adds icons for folder paths ending in ".git". This adds 16x16 and
32x32 versions of a folder with a Git logo for both the closed and open
versions of the folder icon.
This changes the open parent directory, open recent, and open folder
16x16 icons to be more consistent with the other folder icons. This
also improves the other elements on these icons by adding tinting
and shading.
Wand Selection tool uses similar logic to the Bucket Tool. Flood filling
and threshold calculations to determine the affected area just in this
case we do not set the pixels of the selected area, instead we use
those pixels to alter the selection mask.
In the future we can probably abstract out the shared flood logic so
both tools can share the code.
This adds menu item icons for Add Mask, Flatten Image, Fit Image To
View, and Generic 5x5 Convolution.
This modifies the menu item icon for Swap Colors to make the action more
obvious and improve accessibility.
Remove the static PNG bitmaps we've been using for GUI radio buttons
and replace them with on-the-fly pixel painting.
This fixes a long-standing issue where radio buttons always looked the
same, regardless of system theme settings. :^)
In #14248 a new image was added to represent Euler's Number. Running
optipng on the image results in a smaller file size but causes
calculator to throw the following error message:
Calculator(39:39): Exiting with runtime error: PNGImageDecoderPlugin:
Palette index out of range.
This commit provides a fixed image file.
This is meant to address #14234 by renaming the "Euler's Constant"
menu item to "Euler's Number". This commit removes the existing
"eulers.png" and replaces with a new "eulers_number.png" for clarity.