Gave ordering to all Color Filter magic tools
This commit is contained in:
parent
4f9112d597
commit
b1bc736f77
7 changed files with 75 additions and 11 deletions
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
Credits: Andrew Corcoran <akanewbie@gmail.com> inspired by the Alien Map GIMP plugin
|
||||
|
||||
Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt
|
||||
Copyright (c) 2002-2024 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
https://tuxpaint.org/
|
||||
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: December 29, 2023
|
||||
Last updated: January 16, 2024
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -71,6 +71,10 @@ const int alien_groups[alien_NUM_TOOLS] = {
|
|||
MAGIC_TYPE_COLOR_FILTERS,
|
||||
};
|
||||
|
||||
const int alien_orders[alien_NUM_TOOLS] = {
|
||||
601,
|
||||
};
|
||||
|
||||
const char *alien_descs[alien_NUM_TOOLS][2] = {
|
||||
{gettext_noop("Click and drag the mouse to change the colors in parts of your picture."),
|
||||
gettext_noop("Click to change the colors in your entire picture."),},
|
||||
|
|
@ -83,6 +87,7 @@ int alien_get_tool_count(magic_api * api);
|
|||
SDL_Surface *alien_get_icon(magic_api * api, int which);
|
||||
char *alien_get_name(magic_api * api, int which);
|
||||
int alien_get_group(magic_api * api, int which);
|
||||
int alien_get_order(int which);
|
||||
char *alien_get_description(magic_api * api, int which, int mode);
|
||||
void alien_drag(magic_api * api, int which, SDL_Surface * canvas,
|
||||
SDL_Surface * last, int ox, int oy, int x, int y, SDL_Rect * update_rect);
|
||||
|
|
@ -150,6 +155,11 @@ int alien_get_group(magic_api * api ATTRIBUTE_UNUSED, int which)
|
|||
return alien_groups[which];
|
||||
}
|
||||
|
||||
int alien_get_order(int which)
|
||||
{
|
||||
return alien_orders[which];
|
||||
}
|
||||
|
||||
// Return our descriptions, localized:
|
||||
char *alien_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Applies a "bloom" effect to the image.
|
||||
(https://en.wikipedia.org/wiki/Bloom_(shader_effect))
|
||||
|
||||
Last updated: December 29, 2023
|
||||
Last updated: January 16, 2024
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -47,6 +47,7 @@ int bloom_get_tool_count(magic_api * api);
|
|||
SDL_Surface *bloom_get_icon(magic_api * api, int which);
|
||||
char *bloom_get_name(magic_api * api, int which);
|
||||
int bloom_get_group(magic_api * api, int which);
|
||||
int bloom_get_order(int which);
|
||||
char *bloom_get_description(magic_api * api, int which, int mode);
|
||||
int bloom_requires_colors(magic_api * api, int which);
|
||||
int bloom_modes(magic_api * api, int which);
|
||||
|
|
@ -107,11 +108,16 @@ char *bloom_get_name(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSE
|
|||
return strdup(gettext("Bloom"));
|
||||
}
|
||||
|
||||
int bloom_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED ATTRIBUTE_UNUSED)
|
||||
int bloom_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return MAGIC_TYPE_COLOR_FILTERS;
|
||||
}
|
||||
|
||||
int bloom_get_order(int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 900;
|
||||
}
|
||||
|
||||
char *bloom_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode)
|
||||
{
|
||||
if (mode == MODE_PAINT)
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ int cartoon_get_tool_count(magic_api * api);
|
|||
SDL_Surface *cartoon_get_icon(magic_api * api, int which);
|
||||
char *cartoon_get_name(magic_api * api, int which);
|
||||
int cartoon_get_group(magic_api * api, int which);
|
||||
int cartoon_get_order(int which);
|
||||
char *cartoon_get_description(magic_api * api, int which, int mode);
|
||||
void cartoon_apply_colors(magic_api * api, SDL_Surface * surf, int xx, int yy);
|
||||
void cartoon_apply_outline(magic_api * api, int xx, int yy);
|
||||
|
|
@ -117,6 +118,12 @@ int cartoon_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUS
|
|||
return MAGIC_TYPE_COLOR_FILTERS;
|
||||
}
|
||||
|
||||
// Return our orders
|
||||
int cartoon_get_order(int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 600;
|
||||
}
|
||||
|
||||
// Return our descriptions, localized:
|
||||
char *cartoon_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Color separation effect (a la red/cyan aka red/blue 3D glasses).
|
||||
Bill Kendrick
|
||||
|
||||
Last updated: December 29, 2023
|
||||
Last updated: January 16, 2024
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -58,6 +58,7 @@ int colorsep_get_tool_count(magic_api * api);
|
|||
SDL_Surface *colorsep_get_icon(magic_api * api, int which);
|
||||
char *colorsep_get_name(magic_api * api, int which);
|
||||
int colorsep_get_group(magic_api * api, int which);
|
||||
int colorsep_get_order(int which);
|
||||
char *colorsep_get_description(magic_api * api, int which, int mode);
|
||||
int colorsep_requires_colors(magic_api * api, int which);
|
||||
int colorsep_modes(magic_api * api, int which);
|
||||
|
|
@ -125,6 +126,11 @@ int colorsep_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNU
|
|||
return MAGIC_TYPE_COLOR_FILTERS;
|
||||
}
|
||||
|
||||
int colorsep_get_order(int which)
|
||||
{
|
||||
return 700 + which;
|
||||
}
|
||||
|
||||
char *colorsep_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return strdup(gettext(colorsep_descrs[which]));
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
Fade and Darken Magic Tools Plugin
|
||||
Tux Paint - A simple drawing program for children.
|
||||
|
||||
Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt
|
||||
Copyright (c) 2002-2024 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
https://tuxpaint.org/
|
||||
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: December 29, 2023
|
||||
Last updated: January 16, 2024
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -52,6 +52,15 @@ char *tool_names[NUM_TOOLS] = {
|
|||
gettext_noop("Keep Color"),
|
||||
};
|
||||
|
||||
int tool_orders[NUM_TOOLS] = {
|
||||
301,
|
||||
300,
|
||||
201,
|
||||
200,
|
||||
401,
|
||||
402,
|
||||
};
|
||||
|
||||
char *tool_descriptions[NUM_TOOLS][2] = {
|
||||
{
|
||||
gettext_noop("Click and drag the mouse to lighten parts of your picture."),
|
||||
|
|
@ -112,6 +121,7 @@ Uint32 fade_darken_api_version(void);
|
|||
int fade_darken_get_tool_count(magic_api * api);
|
||||
SDL_Surface *fade_darken_get_icon(magic_api * api, int which);
|
||||
int fade_darken_get_group(magic_api * api, int which);
|
||||
int fade_darken_get_order(int which);
|
||||
char *fade_darken_get_name(magic_api * api, int which);
|
||||
char *fade_darken_get_description(magic_api * api, int which, int mode);
|
||||
static void do_fade_darken(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y);
|
||||
|
|
@ -182,6 +192,12 @@ int fade_darken_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_
|
|||
return MAGIC_TYPE_COLOR_FILTERS;
|
||||
}
|
||||
|
||||
// Return our order:
|
||||
int fade_darken_get_order(int which)
|
||||
{
|
||||
return tool_orders[which];
|
||||
}
|
||||
|
||||
// Return our description, localized:
|
||||
char *fade_darken_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
Negative Magic Tool Plugin
|
||||
Tux Paint - A simple drawing program for children.
|
||||
|
||||
Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt
|
||||
Copyright (c) 2002-2024 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
https://tuxpaint.org/
|
||||
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: December 29, 2023
|
||||
Last updated: January 16, 2024
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -41,6 +41,7 @@ int negative_get_tool_count(magic_api * api);
|
|||
SDL_Surface *negative_get_icon(magic_api * api, int which);
|
||||
char *negative_get_name(magic_api * api, int which);
|
||||
int negative_get_group(magic_api * api, int which);
|
||||
int negative_get_order(int which);
|
||||
char *negative_get_description(magic_api * api, int which, int mode);
|
||||
static void do_negative(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y);
|
||||
void negative_drag(magic_api * api, int which, SDL_Surface * canvas,
|
||||
|
|
@ -131,6 +132,12 @@ int negative_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNU
|
|||
return MAGIC_TYPE_COLOR_FILTERS;
|
||||
}
|
||||
|
||||
// Return our order:
|
||||
int negative_get_order(int which)
|
||||
{
|
||||
return 100 + which;
|
||||
}
|
||||
|
||||
// Return our description, localized:
|
||||
char *negative_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
Credits: Andrew Corcoran <akanewbie@gmail.com>
|
||||
|
||||
Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt
|
||||
Copyright (c) 2002-2024 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
https://tuxpaint.org/
|
||||
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: December 29, 2023
|
||||
Last updated: January 16, 2024
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -74,6 +74,11 @@ const char *tint_names[tint_NUM_TOOLS] = {
|
|||
gettext_noop("Color & White") // It does more than this but more intuitive than threshold.
|
||||
};
|
||||
|
||||
const int tint_orders[tint_NUM_TOOLS] = {
|
||||
500,
|
||||
501,
|
||||
};
|
||||
|
||||
const char *tint_descs[tint_NUM_TOOLS][2] = {
|
||||
{gettext_noop("Click and drag the mouse around to change the color of parts of your picture."),
|
||||
gettext_noop("Click to change the color of your entire picture."),},
|
||||
|
|
@ -87,6 +92,7 @@ int tint_get_tool_count(magic_api * api);
|
|||
SDL_Surface *tint_get_icon(magic_api * api, int which);
|
||||
char *tint_get_name(magic_api * api, int which);
|
||||
int tint_get_group(magic_api * api, int which);
|
||||
int tint_get_order(int which);
|
||||
char *tint_get_description(magic_api * api, int which, int mode);
|
||||
static int tint_grey(Uint8 r1, Uint8 g1, Uint8 b1);
|
||||
static void do_tint_pixel(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y);
|
||||
|
|
@ -156,6 +162,12 @@ int tint_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
|||
return MAGIC_TYPE_COLOR_FILTERS;
|
||||
}
|
||||
|
||||
// Return our order:
|
||||
int tint_get_order(int which)
|
||||
{
|
||||
return tint_orders[which];
|
||||
}
|
||||
|
||||
// Return our descriptions, localized:
|
||||
char *tint_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue