Dither magic tools: Add icon

Also, less darkening in "Keep Color" variation.
This commit is contained in:
Bill Kendrick 2024-03-19 23:13:02 -07:00
parent dbfd855a12
commit ef3f150a88
4 changed files with 5 additions and 6 deletions

View file

@ -6,7 +6,7 @@ Copyright (c) 2002-2024
Various contributors (see below, and AUTHORS.txt) Various contributors (see below, and AUTHORS.txt)
https://tuxpaint.org/ https://tuxpaint.org/
2024.March.15 (0.9.33) 2024.March.19 (0.9.33)
* New Magic Tools: * New Magic Tools:
---------------- ----------------
* WIP Specular Reflection: Draws a slightly blurred, wavy, and * WIP Specular Reflection: Draws a slightly blurred, wavy, and
@ -22,7 +22,6 @@ https://tuxpaint.org/
or the currently-selected color; with "Dither (Keep Color)", X is or the currently-selected color; with "Dither (Keep Color)", X is
a muted version of the original color. a muted version of the original color.
Bill Kendrick <bill@newbreedsoftware.com> Bill Kendrick <bill@newbreedsoftware.com>
+ WIP Needs icon
+ WIP Needs sound effect + WIP Needs sound effect
* Improvements to Eraser tool: * Improvements to Eraser tool:

BIN
magic/icons/dither.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -5,7 +5,7 @@
(Using Atkinso dithering: https://en.wikipedia.org/wiki/Atkinson_dithering) (Using Atkinso dithering: https://en.wikipedia.org/wiki/Atkinson_dithering)
by Bill Kendrick <bill@newbreedsoftware.com> by Bill Kendrick <bill@newbreedsoftware.com>
Last updated: February 29, 2024 Last updated: March 19, 2024
*/ */
@ -45,8 +45,8 @@ char * dither_descr[NUM_TOOLS][2] = {
}; };
char * dither_icon_filenames[NUM_TOOLS] = { char * dither_icon_filenames[NUM_TOOLS] = {
"reflection.png", // FIXME "dither.png",
"reflection.png", // FIXME "dither_keep_color.png",
}; };
char * dither_snd_filenames[NUM_TOOLS] = { char * dither_snd_filenames[NUM_TOOLS] = {
@ -323,7 +323,7 @@ dither_release(magic_api * api, int which,
else else
{ {
api->rgbtohsv(r, g, b, &h, &s, &v); api->rgbtohsv(r, g, b, &h, &s, &v);
api->hsvtorgb(floor(h / 2.0) * 2.0, min(s + 0.5, 1.0), v / 2.0, &r, &g, &b); api->hsvtorgb(floor(h / 2.0) * 2.0, min(s + 0.5, 1.0), v * 0.66, &r, &g, &b);
api->putpixel(canvas, x, y, SDL_MapRGB(canvas->format, r, g, b)); api->putpixel(canvas, x, y, SDL_MapRGB(canvas->format, r, g, b));
} }
} }