From 81cf486d4ddf50b758547388a91cd4ca53e3f78b Mon Sep 17 00:00:00 2001 From: Bill Kendrick Date: Thu, 29 Jun 2023 17:35:23 -0700 Subject: [PATCH] Resync docs to get is_IS tp_magic_example.c --- docs/gl_ES.UTF-8/html/tp_magic_example.c | 2 +- docs/gl_ES.UTF-8/tp_magic_example.c | 2 +- docs/is_IS.UTF-8/html/tp_magic_example.c | 76 ++++++++++++------------ docs/is_IS.UTF-8/tp_magic_example.c | 76 ++++++++++++------------ docs/ja_JP.UTF-8/html/tp_magic_example.c | 2 +- docs/ja_JP.UTF-8/tp_magic_example.c | 2 +- 6 files changed, 80 insertions(+), 80 deletions(-) diff --git a/docs/gl_ES.UTF-8/html/tp_magic_example.c b/docs/gl_ES.UTF-8/html/tp_magic_example.c index e77edfa70..2e5a17ea3 100644 --- a/docs/gl_ES.UTF-8/html/tp_magic_example.c +++ b/docs/gl_ES.UTF-8/html/tp_magic_example.c @@ -1,7 +1,7 @@ /* tp_magic_example.c An example of a "Magic" tool plugin for Tux Paint - 13 de Abril de 2023 + Abril 13, 2023 */ diff --git a/docs/gl_ES.UTF-8/tp_magic_example.c b/docs/gl_ES.UTF-8/tp_magic_example.c index e77edfa70..2e5a17ea3 100644 --- a/docs/gl_ES.UTF-8/tp_magic_example.c +++ b/docs/gl_ES.UTF-8/tp_magic_example.c @@ -1,7 +1,7 @@ /* tp_magic_example.c An example of a "Magic" tool plugin for Tux Paint - 13 de Abril de 2023 + Abril 13, 2023 */ diff --git a/docs/is_IS.UTF-8/html/tp_magic_example.c b/docs/is_IS.UTF-8/html/tp_magic_example.c index 89d95427a..dfebafd94 100644 --- a/docs/is_IS.UTF-8/html/tp_magic_example.c +++ b/docs/is_IS.UTF-8/html/tp_magic_example.c @@ -1,7 +1,7 @@ /* tp_magic_example.c An example of a "Magic" tool plugin for Tux Paint - apríl 13, 2023 + 13. apríl 2023 */ @@ -9,8 +9,8 @@ /* ---------------------------------------------------------------------- */ #include -#include // For "strdup()" -#include // For "gettext()" +#include // Fyrir "strdup()" +#include // Fyrir "gettext()" #include "tp_magic_api.h" // Tux Paint "Magic" tool API header #include "SDL_image.h" // For IMG_Load(), to load our PNG icon @@ -87,7 +87,7 @@ selected in Tux Paint (for tool 1): */ Uint8 example_r, example_g, example_b; /* The size the user has selected in Tux Paint (for tool 2): */ -Uint8 example_size; +Uint8 example_stærð; /* Our local function prototypes: */ @@ -101,11 +101,11 @@ _before_ them. */ void example_drag(magic_api * api, int which, SDL_Surface * canvas, - SDL_Surface * snapshot, int old_x, int old_y, int x, int y, + SDL_Surface * skjámynd, int old_x, int old_y, int x, int y, SDL_Rect * update_rect); void example_line_callback(void *pointer, int which, SDL_Surface * canvas, - SDL_Surface * snapshot, int x, int y); + SDL_Surface * skjámynd, int x, int y); /* Setup Functions: */ @@ -129,7 +129,7 @@ Uint32 example_api_version(void) /* -Initialization +Frumstilling This happens once, when Tux Paint starts up and is loading all of the 'Magic' tool plugins. (Assuming what we returned from api_version was @@ -281,7 +281,7 @@ Report our 'Magic' tool descriptions When Tux Paint is starting up and loading plugins, it asks us to provide descriptions of each 'Magic' tool. */ -char *example_get_description(magic_api * api, int which, int mode) +char *example_get_description(magic_api * api, int which, int hamur) { const char *our_desc_english; const char *our_desc_localized; @@ -340,7 +340,7 @@ int example_modes(magic_api * api, int which) // Report whether the tools offer sizing options -Uint8 example_accepted_sizes(magic_api * api, int which, int mode) +Uint8 example_accepted_sizes(magic_api * api, int which, int hamur) { if (which == TOOL_ONE) return 1; @@ -351,14 +351,14 @@ Uint8 example_accepted_sizes(magic_api * api, int which, int mode) // Return our default sizing option -Uint8 example_default_size(magic_api * api, int which, int mode) +Uint8 example_default_size(magic_api * api, int which, int hamur) { return 1; } /* -Shut down +Slökkva Tux Paint is quitting. When it quits, it asks all of the plugins to 'clean up' after themselves. We, for example, loaded some sound effects at @@ -384,8 +384,8 @@ void example_shutdown(magic_api * api) /* Affect the canvas on click: */ void -example_click(magic_api * api, int which, int mode, - SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, +example_click(magic_api * api, int which, int hamur, + SDL_Surface * canvas, SDL_Surface * skjámynd, int x, int y, SDL_Rect * update_rect) { /* @@ -397,14 +397,14 @@ example_click(magic_api * api, int which, int mode, both the beginning and end points of a line. */ - example_drag(api, which, canvas, snapshot, x, y, x, y, update_rect); + example_drag(api, which, canvas, skjámynd, x, y, x, y, update_rect); } /* Affect the canvas on drag: */ void example_drag(magic_api * api, int which, - SDL_Surface * canvas, SDL_Surface * snapshot, + SDL_Surface * canvas, SDL_Surface * skjámynd, int old_x, int old_y, int x, int y, SDL_Rect * update_rect) { @@ -417,15 +417,15 @@ example_drag(magic_api * api, int which, coordinates along the line, as well as other useful things (which of our 'Magic' tools is being used and the current and snapshot canvases). */ - SDL_LockSurface(snapshot); + SDL_LockSurface(skjámynd); SDL_LockSurface(canvas); - api->line((void *) api, which, canvas, snapshot, + api->line((void *) api, which, canvas, skjámynd, old_x, old_y, x, y, 1, example_line_callback); SDL_UnlockSurface(canvas); - SDL_UnlockSurface(snapshot); + SDL_UnlockSurface(skjámynd); /* If we need to, swap the X and/or Y values, so that the coordinates @@ -436,17 +436,17 @@ example_drag(magic_api * api, int which, if (old_x > x) { - int temp = old_x; + int bráðabirgða = old_x; old_x = x; - x = temp; + x = bráðabirgða; } if (old_y > y) { - int temp = old_y; + int bráðabirgða = old_y; old_y = y; - y = temp; + y = bráðabirgða; } @@ -462,10 +462,10 @@ example_drag(magic_api * api, int which, update_rect->w = (x - old_x) + 1; update_rect->h = (y - old_y) + 1; } else { - update_rect->x = old_x - example_size; - update_rect->y = old_y - example_size; - update_rect->w = (x + example_size) - update_rect->x + 1; - update_rect->h = (y + example_size) - update_rect->y + 1; + update_rect->x = old_x - example_stærð; + update_rect->y = old_y - example_stærð; + update_rect->w = (x + example_stærð) - update_rect->x + 1; + update_rect->h = (y + example_stærð) - update_rect->y + 1; } /* @@ -480,7 +480,7 @@ example_drag(magic_api * api, int which, to speaker as you drag the mouse around the canvas!) */ api->playsound(sound_effects[which], - (x * 255) / canvas->w, /* Left/right pan */ + (x * 255) / canvas->w, /* vinstri/hægri hliðrun */ 255 /* Near/far distance (loudness) */); } @@ -489,7 +489,7 @@ example_drag(magic_api * api, int which, void example_release(magic_api * api, int which, - SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, + SDL_Surface * canvas, SDL_Surface * skjámynd, int x, int y, SDL_Rect * update_rect) { /* @@ -511,7 +511,7 @@ changes their chosen, we'll be informed of that as well. The color comes in as RGB (red, green, and blue) values from 0 (darkest) to 255 (brightest). */ -void example_set_color(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) +void example_set_color(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * skjámynd, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { /* We simply store the RGB values in the global variables we declared at @@ -536,7 +536,7 @@ that as well. The size comes in as an unsigned integer (Uint8) between 1 and the value returned by our example_accepted_sizes() function during setup. */ -void example_set_size(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, Uint8 size, SDL_Rect * update_rect) +void example_set_size(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * skjámynd, Uint8 stærð, SDL_Rect * update_rect) { /* Store the new size into the global variable we declared at the top of @@ -565,7 +565,7 @@ Our callback pays attention to 'which' to determine which of our plugin's tools is currently selected. */ void example_line_callback(void *pointer, int which, SDL_Surface * canvas, - SDL_Surface * snapshot, int x, int y) + SDL_Surface * skjámynd, int x, int y) { /* For technical reasons, we can't accept a pointer to the Tux Paint API's @@ -611,14 +611,14 @@ void example_line_callback(void *pointer, int which, SDL_Surface * canvas, from the opposite side of the canvas and puts it under the cursor. */ - for (yy = -example_size; yy < example_size; yy++) + for (yy = -example_stærð; yy < example_stærð; yy++) { - for (xx = -example_size; xx < example_size; xx++) + for (xx = -example_stærð; xx < example_stærð; xx++) { api->putpixel(canvas, x + xx, y + yy, - api->getpixel(snapshot, - snapshot->w - x - xx, - snapshot->h - y - yy)); + api->getpixel(skjámynd, + skjámynd->w - x - xx, + skjámynd->h - y - yy)); /* Here we have simply use Tux Paint's "getpixel()" routine to pull pixel @@ -650,7 +650,7 @@ call to 'example_switchout()', below, for the old mode). Our example doesn't do anything when we switch to, or away from, our Magic tools, so we just do nothing here. */ -void example_switchin(magic_api * api, int which, int mode, +void example_switchin(magic_api * api, int which, int hamur, SDL_Surface * canvas) { } @@ -674,7 +674,7 @@ call to 'example_switchin()', above, for the new mode). Our example doesn't do anything when we switch to, or away from, our Magic tools, so we just do nothing here. */ -void example_switchout(magic_api * api, int which, int mode, +void example_switchout(magic_api * api, int which, int hamur, SDL_Surface * canvas) { } diff --git a/docs/is_IS.UTF-8/tp_magic_example.c b/docs/is_IS.UTF-8/tp_magic_example.c index 89d95427a..dfebafd94 100644 --- a/docs/is_IS.UTF-8/tp_magic_example.c +++ b/docs/is_IS.UTF-8/tp_magic_example.c @@ -1,7 +1,7 @@ /* tp_magic_example.c An example of a "Magic" tool plugin for Tux Paint - apríl 13, 2023 + 13. apríl 2023 */ @@ -9,8 +9,8 @@ /* ---------------------------------------------------------------------- */ #include -#include // For "strdup()" -#include // For "gettext()" +#include // Fyrir "strdup()" +#include // Fyrir "gettext()" #include "tp_magic_api.h" // Tux Paint "Magic" tool API header #include "SDL_image.h" // For IMG_Load(), to load our PNG icon @@ -87,7 +87,7 @@ selected in Tux Paint (for tool 1): */ Uint8 example_r, example_g, example_b; /* The size the user has selected in Tux Paint (for tool 2): */ -Uint8 example_size; +Uint8 example_stærð; /* Our local function prototypes: */ @@ -101,11 +101,11 @@ _before_ them. */ void example_drag(magic_api * api, int which, SDL_Surface * canvas, - SDL_Surface * snapshot, int old_x, int old_y, int x, int y, + SDL_Surface * skjámynd, int old_x, int old_y, int x, int y, SDL_Rect * update_rect); void example_line_callback(void *pointer, int which, SDL_Surface * canvas, - SDL_Surface * snapshot, int x, int y); + SDL_Surface * skjámynd, int x, int y); /* Setup Functions: */ @@ -129,7 +129,7 @@ Uint32 example_api_version(void) /* -Initialization +Frumstilling This happens once, when Tux Paint starts up and is loading all of the 'Magic' tool plugins. (Assuming what we returned from api_version was @@ -281,7 +281,7 @@ Report our 'Magic' tool descriptions When Tux Paint is starting up and loading plugins, it asks us to provide descriptions of each 'Magic' tool. */ -char *example_get_description(magic_api * api, int which, int mode) +char *example_get_description(magic_api * api, int which, int hamur) { const char *our_desc_english; const char *our_desc_localized; @@ -340,7 +340,7 @@ int example_modes(magic_api * api, int which) // Report whether the tools offer sizing options -Uint8 example_accepted_sizes(magic_api * api, int which, int mode) +Uint8 example_accepted_sizes(magic_api * api, int which, int hamur) { if (which == TOOL_ONE) return 1; @@ -351,14 +351,14 @@ Uint8 example_accepted_sizes(magic_api * api, int which, int mode) // Return our default sizing option -Uint8 example_default_size(magic_api * api, int which, int mode) +Uint8 example_default_size(magic_api * api, int which, int hamur) { return 1; } /* -Shut down +Slökkva Tux Paint is quitting. When it quits, it asks all of the plugins to 'clean up' after themselves. We, for example, loaded some sound effects at @@ -384,8 +384,8 @@ void example_shutdown(magic_api * api) /* Affect the canvas on click: */ void -example_click(magic_api * api, int which, int mode, - SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, +example_click(magic_api * api, int which, int hamur, + SDL_Surface * canvas, SDL_Surface * skjámynd, int x, int y, SDL_Rect * update_rect) { /* @@ -397,14 +397,14 @@ example_click(magic_api * api, int which, int mode, both the beginning and end points of a line. */ - example_drag(api, which, canvas, snapshot, x, y, x, y, update_rect); + example_drag(api, which, canvas, skjámynd, x, y, x, y, update_rect); } /* Affect the canvas on drag: */ void example_drag(magic_api * api, int which, - SDL_Surface * canvas, SDL_Surface * snapshot, + SDL_Surface * canvas, SDL_Surface * skjámynd, int old_x, int old_y, int x, int y, SDL_Rect * update_rect) { @@ -417,15 +417,15 @@ example_drag(magic_api * api, int which, coordinates along the line, as well as other useful things (which of our 'Magic' tools is being used and the current and snapshot canvases). */ - SDL_LockSurface(snapshot); + SDL_LockSurface(skjámynd); SDL_LockSurface(canvas); - api->line((void *) api, which, canvas, snapshot, + api->line((void *) api, which, canvas, skjámynd, old_x, old_y, x, y, 1, example_line_callback); SDL_UnlockSurface(canvas); - SDL_UnlockSurface(snapshot); + SDL_UnlockSurface(skjámynd); /* If we need to, swap the X and/or Y values, so that the coordinates @@ -436,17 +436,17 @@ example_drag(magic_api * api, int which, if (old_x > x) { - int temp = old_x; + int bráðabirgða = old_x; old_x = x; - x = temp; + x = bráðabirgða; } if (old_y > y) { - int temp = old_y; + int bráðabirgða = old_y; old_y = y; - y = temp; + y = bráðabirgða; } @@ -462,10 +462,10 @@ example_drag(magic_api * api, int which, update_rect->w = (x - old_x) + 1; update_rect->h = (y - old_y) + 1; } else { - update_rect->x = old_x - example_size; - update_rect->y = old_y - example_size; - update_rect->w = (x + example_size) - update_rect->x + 1; - update_rect->h = (y + example_size) - update_rect->y + 1; + update_rect->x = old_x - example_stærð; + update_rect->y = old_y - example_stærð; + update_rect->w = (x + example_stærð) - update_rect->x + 1; + update_rect->h = (y + example_stærð) - update_rect->y + 1; } /* @@ -480,7 +480,7 @@ example_drag(magic_api * api, int which, to speaker as you drag the mouse around the canvas!) */ api->playsound(sound_effects[which], - (x * 255) / canvas->w, /* Left/right pan */ + (x * 255) / canvas->w, /* vinstri/hægri hliðrun */ 255 /* Near/far distance (loudness) */); } @@ -489,7 +489,7 @@ example_drag(magic_api * api, int which, void example_release(magic_api * api, int which, - SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, + SDL_Surface * canvas, SDL_Surface * skjámynd, int x, int y, SDL_Rect * update_rect) { /* @@ -511,7 +511,7 @@ changes their chosen, we'll be informed of that as well. The color comes in as RGB (red, green, and blue) values from 0 (darkest) to 255 (brightest). */ -void example_set_color(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) +void example_set_color(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * skjámynd, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { /* We simply store the RGB values in the global variables we declared at @@ -536,7 +536,7 @@ that as well. The size comes in as an unsigned integer (Uint8) between 1 and the value returned by our example_accepted_sizes() function during setup. */ -void example_set_size(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, Uint8 size, SDL_Rect * update_rect) +void example_set_size(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * skjámynd, Uint8 stærð, SDL_Rect * update_rect) { /* Store the new size into the global variable we declared at the top of @@ -565,7 +565,7 @@ Our callback pays attention to 'which' to determine which of our plugin's tools is currently selected. */ void example_line_callback(void *pointer, int which, SDL_Surface * canvas, - SDL_Surface * snapshot, int x, int y) + SDL_Surface * skjámynd, int x, int y) { /* For technical reasons, we can't accept a pointer to the Tux Paint API's @@ -611,14 +611,14 @@ void example_line_callback(void *pointer, int which, SDL_Surface * canvas, from the opposite side of the canvas and puts it under the cursor. */ - for (yy = -example_size; yy < example_size; yy++) + for (yy = -example_stærð; yy < example_stærð; yy++) { - for (xx = -example_size; xx < example_size; xx++) + for (xx = -example_stærð; xx < example_stærð; xx++) { api->putpixel(canvas, x + xx, y + yy, - api->getpixel(snapshot, - snapshot->w - x - xx, - snapshot->h - y - yy)); + api->getpixel(skjámynd, + skjámynd->w - x - xx, + skjámynd->h - y - yy)); /* Here we have simply use Tux Paint's "getpixel()" routine to pull pixel @@ -650,7 +650,7 @@ call to 'example_switchout()', below, for the old mode). Our example doesn't do anything when we switch to, or away from, our Magic tools, so we just do nothing here. */ -void example_switchin(magic_api * api, int which, int mode, +void example_switchin(magic_api * api, int which, int hamur, SDL_Surface * canvas) { } @@ -674,7 +674,7 @@ call to 'example_switchin()', above, for the new mode). Our example doesn't do anything when we switch to, or away from, our Magic tools, so we just do nothing here. */ -void example_switchout(magic_api * api, int which, int mode, +void example_switchout(magic_api * api, int which, int hamur, SDL_Surface * canvas) { } diff --git a/docs/ja_JP.UTF-8/html/tp_magic_example.c b/docs/ja_JP.UTF-8/html/tp_magic_example.c index 86247cb02..076fcffc0 100644 --- a/docs/ja_JP.UTF-8/html/tp_magic_example.c +++ b/docs/ja_JP.UTF-8/html/tp_magic_example.c @@ -1,7 +1,7 @@ /* tp_magic_example.c An example of a "Magic" tool plugin for Tux Paint - 2023年4月13日 + 4月 13, 2023 */ diff --git a/docs/ja_JP.UTF-8/tp_magic_example.c b/docs/ja_JP.UTF-8/tp_magic_example.c index 86247cb02..076fcffc0 100644 --- a/docs/ja_JP.UTF-8/tp_magic_example.c +++ b/docs/ja_JP.UTF-8/tp_magic_example.c @@ -1,7 +1,7 @@ /* tp_magic_example.c An example of a "Magic" tool plugin for Tux Paint - 2023年4月13日 + 4月 13, 2023 */