Blur: Support sizes

This commit is contained in:
Bill Kendrick 2023-04-12 22:34:06 -07:00
parent 263b382338
commit bd199cf567
2 changed files with 10 additions and 10 deletions

View file

@ -36,6 +36,7 @@ https://tuxpaint.org/
* Various Magic tools now support sizing options: * Various Magic tools now support sizing options:
+ Kaleidoscope + Kaleidoscope
+ Blur
+ WIP... more! + WIP... more!
* Other Improvements: * Other Improvements:

View file

@ -72,7 +72,7 @@ enum
blur_NUM_TOOLS blur_NUM_TOOLS
}; };
static const int blur_RADIUS = 16; static int blur_RADIUS = 16;
static Mix_Chunk *blur_snd_effect[blur_NUM_TOOLS]; static Mix_Chunk *blur_snd_effect[blur_NUM_TOOLS];
@ -319,9 +319,10 @@ void blur_set_color(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED
} }
// Record the size from Tux Paint: // Record the size from Tux Paint:
void blur_set_size(magic_api * api, int which, SDL_Surface * canvas, void blur_set_size(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED,
SDL_Surface * last, Uint8 sz, SDL_Rect * update_rect) { SDL_Surface * canvas ATTRIBUTE_UNUSED, SDL_Surface * last ATTRIBUTE_UNUSED,
/* FIXME */ Uint8 sz, SDL_Rect * update_rect ATTRIBUTE_UNUSED) {
blur_RADIUS = sz * 4;
} }
// Use colors: // Use colors:
@ -332,14 +333,12 @@ int blur_requires_colors(magic_api * api ATTRIBUTE_UNUSED,
} }
Uint8 blur_accepted_sizes(magic_api * api, int which) { Uint8 blur_accepted_sizes(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED) {
/* FIXME */ return 8;
return 1;
} }
Uint8 blur_default_size(magic_api * api, int which) { Uint8 blur_default_size(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED) {
/* FIXME */ return 4;
return 1;
} }
void blur_switchin(magic_api * api ATTRIBUTE_UNUSED, void blur_switchin(magic_api * api ATTRIBUTE_UNUSED,