Halftone: Update for new plugin API
(No size support at this time.)
This commit is contained in:
parent
a1d3202754
commit
17b23e19d0
1 changed files with 23 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
/* halftone.c
|
/* halftone.c
|
||||||
|
|
||||||
Last updated: February 12, 2023
|
Last updated: April 22, 2023
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -64,7 +64,7 @@ void halftone_drag(magic_api * api, int which, SDL_Surface * canvas,
|
||||||
void halftone_line_callback(void *ptr, int which, SDL_Surface * canvas,
|
void halftone_line_callback(void *ptr, int which, SDL_Surface * canvas,
|
||||||
SDL_Surface * snapshot, int x, int y);
|
SDL_Surface * snapshot, int x, int y);
|
||||||
Uint32 halftone_api_version(void);
|
Uint32 halftone_api_version(void);
|
||||||
int halftone_init(magic_api * api);
|
int halftone_init(magic_api * api, Uint32 disabled_features);
|
||||||
int halftone_get_tool_count(magic_api * api);
|
int halftone_get_tool_count(magic_api * api);
|
||||||
SDL_Surface *halftone_get_icon(magic_api * api, int which);
|
SDL_Surface *halftone_get_icon(magic_api * api, int which);
|
||||||
char *halftone_get_name(magic_api * api, int which);
|
char *halftone_get_name(magic_api * api, int which);
|
||||||
|
|
@ -86,13 +86,18 @@ void halftone_switchin(magic_api * api, int which, int mode,
|
||||||
void halftone_switchout(magic_api * api, int which, int mode,
|
void halftone_switchout(magic_api * api, int which, int mode,
|
||||||
SDL_Surface * canvas);
|
SDL_Surface * canvas);
|
||||||
void halftone_rgb2cmyk(Uint8 r, Uint8 g, Uint8 b, float cmyk[]);
|
void halftone_rgb2cmyk(Uint8 r, Uint8 g, Uint8 b, float cmyk[]);
|
||||||
|
Uint8 halftone_accepted_sizes(magic_api * api, int which, int mode);
|
||||||
|
Uint8 halftone_default_size(magic_api * api, int which, int mode);
|
||||||
|
void halftone_set_size(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * last, Uint8 size, SDL_Rect * update_rect);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Uint32 halftone_api_version(void)
|
Uint32 halftone_api_version(void)
|
||||||
{
|
{
|
||||||
return (TP_MAGIC_API_VERSION);
|
return (TP_MAGIC_API_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
int halftone_init(magic_api * api)
|
int halftone_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char fname[1024];
|
char fname[1024];
|
||||||
|
|
@ -447,3 +452,18 @@ void halftone_rgb2cmyk(Uint8 r, Uint8 g, Uint8 b, float cmyk[])
|
||||||
cmyk[2] = y;
|
cmyk[2] = y;
|
||||||
cmyk[3] = k;
|
cmyk[3] = k;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Uint8 halftone_accepted_sizes(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
return 0; // No size support at this time
|
||||||
|
}
|
||||||
|
|
||||||
|
Uint8 halftone_default_size(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
return 0; // No size support at this time
|
||||||
|
}
|
||||||
|
|
||||||
|
void halftone_set_size(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED, SDL_Surface * last ATTRIBUTE_UNUSED, Uint8 size ATTRIBUTE_UNUSED, SDL_Rect * update_rect ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue