# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-10-25 16:12-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #. Icon denoting general information #: ../doc-src/include.php:5 msgid "Information" msgstr "" #. Icon denoting configuration options #: ../doc-src/include.php:8 msgid "Configuration option" msgstr "" #. Icon denoting keyboard shortcuts #: ../doc-src/include.php:11 msgid "Keyboard shortcut" msgstr "" #. Icon denoting differences in features between versions #: ../doc-src/include.php:14 msgid "Version variation" msgstr "" #. "Shift" key on a keyboard #: ../doc-src/include.php:17 msgid "Shift" msgstr "" #. "Control" (Ctrl) key on a keyboard #: ../doc-src/include.php:20 msgid "Control" msgstr "" #. "Alt" key on a (PC) keyboard #: ../doc-src/include.php:23 msgid "Alt" msgstr "" #. "Option" key on a (Mac) keyboard #: ../doc-src/include.php:26 msgid "Option" msgstr "" #. "Escape" (Esc) key on a keyboard #: ../doc-src/include.php:29 msgid "Escape" msgstr "" #. "Tab" key on a keyboard #: ../doc-src/include.php:32 msgid "Tab" msgstr "" #. Left arrow key on a keyboard #: ../doc-src/include.php:35 msgid "Left Arrow" msgstr "" #. Right arrow key on a keyboard #: ../doc-src/include.php:38 msgid "Right Arrow" msgstr "" #. "+" and "-" keys on the numeric keypad of a keyboard #: ../doc-src/include.php:41 msgid "Keypad Plus (+)" msgstr "" #: ../doc-src/include.php:42 msgid "Keypad Minus (-)" msgstr "" #. Copyright string, with args representing starting year, latest year, and contributor(s) #: ../doc-src/include.php:77 #, php-format msgid "" "Copyright © %1$d-%2$d by %3$s; see AUTHORS.txt." msgstr "" #. format string for strftime() #: ../doc-src/include.php:89 msgid "%B %e, %Y" msgstr "" #. The 'username' part of a file path (e.g., "/home/username/xyz" on Linux, "/Users/username/xyz" on macOS, etc.) (Perhaps German "Nutzername", French "identifiant", Dutch "gebruikersnaam", etc.) #: ../doc-src/include.php:137 msgid "username" msgstr "" #. === Paths to certain files and folders under Windows === #. (FIXME: Localize any others parts of paths that get localized under Windows) #: ../doc-src/include.php:165 msgid "Program Files" msgstr "" #. === Paths to certain files and folders under macOS === #: ../doc-src/include.php:187 msgid "/Applications" msgstr "" #: ../doc-src/include.php:188 msgid "Users" msgstr "" #: ../doc-src/include.php:189 msgid "Library" msgstr "" #: ../doc-src/include.php:190 msgid "Application Support" msgstr "" #: ../doc-src/MAGIC-API.php:2 msgid "" "Note: Called once for each Magic tool your plugin claims to contain " "(by your \"get_tool_count()\")." msgstr "" #: ../doc-src/MAGIC-API.php:3 msgid "" "Note: For each Magic tool your plugin claims to contain (reported by " "your \"get_tool_count()\" function), this function will be " "called for each mode the tool claims to support (reported by your " "\"modes()\" function)." msgstr "" #: ../doc-src/MAGIC-API.php:4 #, php-format msgid "Note: Added to Tux Paint %1$s; Magic API version %2$s." msgstr "" #: ../doc-src/MAGIC-API.php:5 #, php-format msgid "" "Note: Changed most recently in Tux Paint %1$s; Magic API version %2$s." msgstr "" #: ../doc-src/MAGIC-API.php:12 msgid "Tux Paint Magic Tool Plugin API Documentation" msgstr "" #: ../doc-src/MAGIC-API.php:33 #, php-format msgid "version %s" msgstr "" #: ../doc-src/MAGIC-API.php:37 msgid "Magic Tool Plugin API Documentation" msgstr "" #: ../doc-src/MAGIC-API.php:41 msgid "various contributors" msgstr "" #: ../doc-src/MAGIC-API.php:54 ../doc-src/MAGIC-API.php:59 msgid "Table of Contents" msgstr "" #: ../doc-src/MAGIC-API.php:66 msgid "Prequisites" msgstr "" #. ------------------------------------------------------------ #: ../doc-src/MAGIC-API.php:67 ../doc-src/MAGIC-API.php:158 msgid "Interfaces" msgstr "" #: ../doc-src/MAGIC-API.php:69 ../doc-src/MAGIC-API.php:185 msgid "'Magic' tool plugin functions" msgstr "" #: ../doc-src/MAGIC-API.php:71 ../doc-src/MAGIC-API.php:196 msgid "Common arguments to plugin functions" msgstr "" #: ../doc-src/MAGIC-API.php:72 ../doc-src/MAGIC-API.php:257 msgid "Required Plugin Functions" msgstr "" #: ../doc-src/MAGIC-API.php:74 ../doc-src/MAGIC-API.php:272 msgid "Plugin \"housekeeping\" functions" msgstr "" #: ../doc-src/MAGIC-API.php:75 ../doc-src/MAGIC-API.php:515 msgid "Plugin event functions" msgstr "" #: ../doc-src/MAGIC-API.php:80 ../doc-src/MAGIC-API.php:620 msgid "Tux Paint Functions and Data" msgstr "" #: ../doc-src/MAGIC-API.php:82 ../doc-src/MAGIC-API.php:631 msgid "Pixel Manipulations" msgstr "" #. FIXME: Zoom Scale #: ../doc-src/MAGIC-API.php:83 ../doc-src/MAGIC-API.php:667 msgid "Helper Functions" msgstr "" #: ../doc-src/MAGIC-API.php:84 ../doc-src/MAGIC-API.php:720 msgid "Informational" msgstr "" #: ../doc-src/MAGIC-API.php:85 ../doc-src/MAGIC-API.php:764 msgid "Sound Functions" msgstr "" #: ../doc-src/MAGIC-API.php:86 ../doc-src/MAGIC-API.php:833 msgid "Tux Paint System Calls" msgstr "" #: ../doc-src/MAGIC-API.php:87 ../doc-src/MAGIC-API.php:888 msgid "Color Conversions" msgstr "" #: ../doc-src/MAGIC-API.php:90 ../doc-src/MAGIC-API.php:923 #, php-format msgid "Helper Macros in %s" msgstr "" #: ../doc-src/MAGIC-API.php:91 ../doc-src/MAGIC-API.php:958 #, php-format msgid "Constant Definitions in %s" msgstr "" #. ------------------------------------------------------------ #: ../doc-src/MAGIC-API.php:94 ../doc-src/MAGIC-API.php:996 msgid "Compiling" msgstr "" #: ../doc-src/MAGIC-API.php:96 ../doc-src/MAGIC-API.php:103 #: ../doc-src/MAGIC-API.php:1003 ../doc-src/MAGIC-API.php:1134 msgid "Linux and other Unix-like Platforms" msgstr "" #: ../doc-src/MAGIC-API.php:97 ../doc-src/MAGIC-API.php:104 #: ../doc-src/MAGIC-API.php:1104 ../doc-src/MAGIC-API.php:1300 msgid "Windows" msgstr "" #. FIXME #: ../doc-src/MAGIC-API.php:98 ../doc-src/MAGIC-API.php:105 #: ../doc-src/MAGIC-API.php:1114 ../doc-src/MAGIC-API.php:1310 msgid "macOS" msgstr "" #. FIXME #. ------------------------------------------------------------ #: ../doc-src/MAGIC-API.php:101 ../doc-src/MAGIC-API.php:1127 msgid "Installing" msgstr "" #. FIXME #. ------------------------------------------------------------ #: ../doc-src/MAGIC-API.php:108 ../doc-src/MAGIC-API.php:1323 msgid "Creating plugins with multiple effects" msgstr "" #. ------------------------------------------------------------ #: ../doc-src/MAGIC-API.php:109 ../doc-src/MAGIC-API.php:1404 msgid "Example Code" msgstr "" #. ------------------------------------------------------------ #: ../doc-src/MAGIC-API.php:110 ../doc-src/MAGIC-API.php:1418 msgid "Getting Help" msgstr "" #: ../doc-src/MAGIC-API.php:111 ../doc-src/MAGIC-API-glossary.php:656 msgid "Glossary" msgstr "" #. ------------------------------------------------------------ #: ../doc-src/MAGIC-API.php:124 msgid "Overview" msgstr "" #: ../doc-src/MAGIC-API.php:129 msgid "" "Beginning with version 0.9.18, Tux Paint's 'Magic' tools were converted from " "routines that lived within the application itself, to a set of 'plugins' " "that are loaded when Tux Paint starts up." msgstr "" #: ../doc-src/MAGIC-API.php:133 msgid "" "This division allows more rapid development of 'Magic' tools, and allows " "programmers to create and test new tools without needing to integrate them " "within the main Tux Paint source code. (Users of more professional graphics " "tools, such as GIMP, should be familiar with this plugin concept.)" msgstr "" #. ------------------------------------------------------------ #: ../doc-src/MAGIC-API.php:143 msgid "Prerequisites" msgstr "" #: ../doc-src/MAGIC-API.php:148 msgid "" "Tux Paint is written in the C programming language, and uses the Simple " "DirectMedia Layer library ('libSDL', or simply 'SDL'; available from https://www.libsdl.org/). Therefore, " "for the moment at least, one must understand the C language and how to " "compile C-based programs. Familiarity with the SDL API is highly " "recommended, but some basic SDL concepts will be covered in this document." msgstr "" #: ../doc-src/MAGIC-API.php:163 msgid "" "Those who create 'Magic' tool plugins for Tux Paint must provide some " "interfaces (C functions) that Tux Paint may invoke." msgstr "" #: ../doc-src/MAGIC-API.php:167 msgid "" "Tux Paint utilizes SDL's \"SDL_LoadObject()\" and \"SDL_LoadFunction()\" " "routines to load plugins (shared objects files; e.g., \".so\" " "files on Linux or \".dll\" files on Windows) and find the " "functions within." msgstr "" #: ../doc-src/MAGIC-API.php:171 msgid "" "In turn, Tux Paint provides a number of helper functions that the plugin may " "(or sometimes is required to) use. This is exposed as a C structure (or " "\"struct\") which contains pointers to functions and other data " "inside Tux Paint. A pointer to this structure gets passed along to the " "plugin's functions as an argument when Tux Paint invokes them." msgstr "" #: ../doc-src/MAGIC-API.php:175 msgid "" "Plugins should #include the C header file \"tp_magic_api." "h\", which exposes the 'Magic' tool plugin API. Also, when you run " "the C compiler to build a plugin, you should use the command-line tool " "\"tp-magic-config\" to get the appropriate compiler flags (such " "as where the compiler can find the Tux Paint plugin header file, as well as " "SDL's header files) for building a plugin. (See \"Compiling\", below.)" msgstr "" #: ../doc-src/MAGIC-API.php:179 msgid "" "The C header file and command-line tool mentioned above are included with " "Tux Paint — or in some cases, as part of a \"Tux Paint 'Magic' Tool " "Plugin Development package\"." msgstr "" #: ../doc-src/MAGIC-API.php:190 msgid "" "'Magic' tool plugins must contain the functions listed below. Note:" " To avoid 'namespace' collisions, each function's name must start with " "the shared object's filename (e.g., \"blur.so\" or \"blur.dll\" would have " "functions whose names begin with \"blur_\"). This includes " "private functions (ones not used by Tux Paint directly), unless you " "declare those as 'static'." msgstr "" #: ../doc-src/MAGIC-API.php:201 msgid "" "Here is a description of arguments that many of your plugin's functions will " "need to accept." msgstr "" #: ../doc-src/MAGIC-API.php:208 msgid "" "Pointer to a C structure containing pointers to Tux Paint functions and " "other data that the plugin can (and sometimes should) use. The contents of " "this struct are described below." msgstr "" #: ../doc-src/MAGIC-API.php:211 msgid "" "Note: The magic_api struct is defined in the C header file " "\"tp_magic_api.h\", which you should include at the top of your " "plugin's C source file:" msgstr "" #: ../doc-src/MAGIC-API.php:220 msgid "" "An index the plugin should use to differentiate different 'Magic' tools, if " "the plugin provides more than one. (If not, \"which\" will always be 0.) " "See \"Creating plugins with multiple effects\", " "below." msgstr "" #: ../doc-src/MAGIC-API.php:225 msgid "" "A snapshot of the previous Tux Paint canvas, taken when the the mouse was " "first clicked to activate the current magic tool. If you don't continuously " "affect the image during one hold of the mouse button, you should base your " "effects off the contents of this canvas. (That is, read from " "\"snapshot\" and write to \"canvas\", below.)" msgstr "" #: ../doc-src/MAGIC-API.php:230 msgid "" "The current Tux Paint drawing canvas. Your magical effects should end up " "here!" msgstr "" #: ../doc-src/MAGIC-API.php:235 msgid "" "A pointer to an SDL 'rectangle' structure that you use to tell Tux Paint " "what part of the canvas has been updated. If your effect affects a 32x32 " "area centered around the mouse pointer, you would fill the SDL_Rect as " "follows:" msgstr "" #: ../doc-src/MAGIC-API.php:242 msgid "" "Or, if your effect changes the entire canvas (e.g., flips it upside-down), " "you'd fill it as follows:" msgstr "" #: ../doc-src/MAGIC-API.php:249 msgid "" "Note: \"update_rect\" is a C pointer (an \"SDL_Rect *\" rather than just an \"SDL_Rect\") because you need to " "fill in its contents. Since it is a pointer, you access its elements via " "\"->\" (arrow) rather than \".\" (dot)." msgstr "" #: ../doc-src/MAGIC-API.php:262 msgid "" "Your plugin is required to contain, at the least, all of the following " "functions." msgstr "" #: ../doc-src/MAGIC-API.php:266 msgid "" "Note: Remember, your plugin's function names must be preceded by your " "plugin's filename. That is, if your plugin is called \"zoom.so\" (on Linux) or \"zoom.dll\" (on Windows), then the names " "of your functions must begin with \"zoom_\" (e.g., " "\"zoom_get_name(...)\")." msgstr "" #: ../doc-src/MAGIC-API.php:280 msgid "" "The plugin should return an integer value representing the version of the " "Tux Paint 'Magic' tool plugin API the plugin was built against. The safest " "thing to do is return the value of TP_MAGIC_API_VERSION, which " "is defined in \"tp_magic_api.h\". If Tux Paint deems your " "plugin to be compatible, it will go ahead and use it." msgstr "" #: ../doc-src/MAGIC-API.php:283 msgid "Note: Called once by Tux Paint, at startup. It is called first." msgstr "" #: ../doc-src/MAGIC-API.php:290 msgid "" "The plugin should do any initialization here. Return '1' if initialization " "was successful, or '0' if not (and Tux Paint will not present any 'Magic' " "tools from the plugin)." msgstr "" #: ../doc-src/MAGIC-API.php:293 msgid "" "Note: Called once by Tux Paint, at startup. It is called after " "\"api_version()\", if Tux Paint believes your plugin to be " "compatible." msgstr "" #: ../doc-src/MAGIC-API.php:296 msgid "" "The disabled_features value contains bits set for any Tux Paint " "features relevant to Magic tools which have been disabled in this session. " "Test using the C bitwise 'and' operator, '&'. The features " "are defined in tp_magic_api.h:" msgstr "" #: ../doc-src/MAGIC-API.php:299 ../doc-src/MAGIC-API.php:305 #: ../doc-src/MAGIC-API.php:317 ../doc-src/MAGIC-API.php:323 #: ../doc-src/MAGIC-API.php:329 #, php-format msgid "%1$s: %2$s (%3$s)" msgstr "" #: ../doc-src/MAGIC-API.php:301 msgid "Magic tool controls (paint vs fullscreen)" msgstr "" #: ../doc-src/MAGIC-API.php:307 msgid "Magic tool size" msgstr "" #: ../doc-src/MAGIC-API.php:311 msgid "" "Your Magic tool(s) may wish to react differently depending on whether one or " "more features have been disabled. (For example, the \"Brick\" Magic tool " "always offered two tool variations: large and small. With the addition of " "the size feature, only one tool is necessary. However, with the size option " "disabled, the plugin is able to revert back to providing two separate tools.)" msgstr "" #: ../doc-src/MAGIC-API.php:314 msgid "" "The complexity_level variable contains the \"complexity level\" " "that Tux Paint magic tools may offer — that is, the expertise level of " "the user. The levels are defined in tp_magic_api.h:" msgstr "" #: ../doc-src/MAGIC-API.php:319 msgid "Novice" msgstr "" #: ../doc-src/MAGIC-API.php:325 msgid "Beginner" msgstr "" #: ../doc-src/MAGIC-API.php:331 msgid "Advanced (default)" msgstr "" #: ../doc-src/MAGIC-API.php:335 msgid "" "Your Magic tool(s) may wish to react differently depending on the expertise " "level of the user, either simplifying how each tool works, or excluding one " "or all of them entirely. (For example, the 1-, 2-, and 3-point perspective " "toolsets are totally inactive when in \"novice\" mode. In \"beginner\" mode, " "the drawing tools are available, but the tools to edit the vanishing point " "positions are disabled; the default vanishing points are used. In fact, in " "\"beginner\" mode, an additional 3-point perspective drawing tool appears, " "with alternative vanishing points.)" msgstr "" #: ../doc-src/MAGIC-API.php:345 msgid "" "This should return the number of Magic tools this plugin provides to Tux " "Paint." msgstr "" #: ../doc-src/MAGIC-API.php:348 msgid "" "Note: Called once by Tux Paint, at startup. It is called after your " "\"init()\", if it succeeded." msgstr "" #: ../doc-src/MAGIC-API.php:351 msgid "" "Note: You may wish to resond differently, based on whether certain " "features have been disabled (e.g., 'paint' versus 'entire picture' controls, " "or 'Magic sizes' controls)." msgstr "" #: ../doc-src/MAGIC-API.php:358 msgid "" "This lets you tell Tux Paint what modes your tool can be used in; either as " "a tool the user can paint with, or a tool that affects the entire drawing at " "once." msgstr "" #: ../doc-src/MAGIC-API.php:361 msgid "" "You must return a value that's some combination of one or more of available " "modes:" msgstr "" #: ../doc-src/MAGIC-API.php:364 msgid "freehand paint (click and drag)" msgstr "" #: ../doc-src/MAGIC-API.php:367 msgid "applies to full image with one click" msgstr "" #: ../doc-src/MAGIC-API.php:370 msgid "freehand paint, with preview (click and drag)" msgstr "" #: ../doc-src/MAGIC-API.php:373 msgid "applies to an area around the mouse, with one click" msgstr "" #: ../doc-src/MAGIC-API.php:376 msgid "" "e.g., if your tool is only one that the user can paint with, return " "\"MODE_PAINT\". If the user can do both, return " "\"MODE_PAINT | MODE_FULLSCREEN\" to tell Tux Paint it can do " "both." msgstr "" #: ../doc-src/MAGIC-API.php:389 msgid "" "This should return a string containing the name of a magic tool. This will " "appear on the button in the 'Magic' selector within Tux Paint." msgstr "" #: ../doc-src/MAGIC-API.php:392 ../doc-src/MAGIC-API.php:454 msgid "" "Tux Paint will free() the string upon exit, so you should wrap " "it in a C strdup() call." msgstr "" #: ../doc-src/MAGIC-API.php:402 msgid "" "Use this to group tools together within sections of the 'Magic' selector. A " "number of groups are pre-defined within an enum found in " "\"tp_magic_api.h\":" msgstr "" #: ../doc-src/MAGIC-API.php:405 msgid "" "Tools that distort the shape of the image, like Blur, Emboss, and Ripples" msgstr "" #: ../doc-src/MAGIC-API.php:408 msgid "" "Tools that mostly affect the colors of the image without distortion, like " "Darken, Negative, and Tint" msgstr "" #: ../doc-src/MAGIC-API.php:411 msgid "Tools that warp or move the entire picture, like Shift, Flip, and Waves" msgstr "" #: ../doc-src/MAGIC-API.php:414 msgid "" "Tools that generally paint new content at the cursor position, like Grass, " "Bricks, and Rails" msgstr "" #: ../doc-src/MAGIC-API.php:417 msgid "" "Tools that paint in multiple places at once, like Kaleidoscope and the " "Symmetry tools" msgstr "" #: ../doc-src/MAGIC-API.php:420 msgid "" "Tools that apply decorations to the entire picture, like Blinds and " "Checkboard" msgstr "" #: ../doc-src/MAGIC-API.php:423 msgid "" "Special-purpose artistic tools, like Flower, the String tools, and the " "Rainbow-arc-drawing tools." msgstr "" #: ../doc-src/MAGIC-API.php:438 msgid "" "This should return an SDL_Surface containing the icon representing the " "tool. (A greyscale image with alpha, no larger than 40x40.) This will " "appear on the button in the 'Magic' selector within Tux Paint." msgstr "" #: ../doc-src/MAGIC-API.php:441 msgid "" "Tux Paint will free (\"SDL_FreeSurface()\") the surface upon " "exit." msgstr "" #: ../doc-src/MAGIC-API.php:451 msgid "" "This should return a string containing the description of how to use a " "particular magic tool. This will appear as a help tip, explained by Tux the " "Penguin, within Tux Paint." msgstr "" #: ../doc-src/MAGIC-API.php:460 msgid "" "In other words, if your plugin contains two tools, one which works in paint " "mode only, and the other that works in both paint mode and full-image mode, " "your plugin's \"get_description()\" will be called three times." msgstr "" #: ../doc-src/MAGIC-API.php:467 msgid "" "Return a '1' if the 'Magic' tool accepts colors (the 'Colors' palette in Tux " "Paint will be available), or '0' if not." msgstr "" #: ../doc-src/MAGIC-API.php:477 msgid "" "Return how many size variations the 'Magic' tool accepts, in the given mode " "(i.e., 'MODE_PAINT' or 'MODE_FULLSCREEN). Return a " "'0' if the 'Magic' tool should not offer sizing options. Returning '1' is " "the same as returning '0'." msgstr "" #: ../doc-src/MAGIC-API.php:490 msgid "" "Return the default size the 'Magic' tool should start out with, in the given " "mode. This will be the default setting for the tool the first time it is " "used during a Tux Paint session. If Tux Paint is being invoked with the " "sizing option disabled, this will be the only size requested by Tux Paint. " "Return a number between '1' and the amount you returned in " "accepted_sizes()." msgstr "" #: ../doc-src/MAGIC-API.php:503 msgid "" "The plugin should do any cleanup here. If you allocated any memory or used " "SDL_Mixer to load any sounds during init(), for example, you " "should free() the allocated memory and Mix_FreeChunk() the sounds here." msgstr "" #: ../doc-src/MAGIC-API.php:506 msgid "Note: This function is called once, when Tux Paint exits." msgstr "" #: ../doc-src/MAGIC-API.php:526 msgid "" "switchin() is called whenever one of the plugin's Magic tools " "becomes active, and switchout() is called whenever one becomes " "inactive. This can be because the user just clicked a specific Magic tool " "(the current one is switched-out, and a new one is switched-in)." msgstr "" #: ../doc-src/MAGIC-API.php:529 msgid "" "It can also happen when user leaves/returns from the selection of \"Magic\" " "tools when doing some other activity (i.e., using a different tool, such as " "\"Text\" or \"Brush\", activating a momentary tool, such as \"Undo\" and " "\"Redo\", or returning from a dialog — possibly with a new picture " "when it switches back — such as \"Open\", \"New\" or \"Quit\"). In " "this case, the same Magic tool is first 'switched-out', and then 'switched-" "back-in', usually moments later." msgstr "" #: ../doc-src/MAGIC-API.php:532 msgid "" "Finally, it can also happen when the user changes the 'mode' of a tool (i." "e., from paint mode to full-image mode). First switchout() is " "called for the old mode, then switchin() is called for the new " "mode." msgstr "" #: ../doc-src/MAGIC-API.php:535 msgid "" "These functions allow users to interact in complicated was with Magic tools " "(for example, a tool that lets the user draw multiple freehand " "strokes, and then uses that as input such as handwriting — normally, " "the user could click somewhere in the canvas to tell the Magic tool they are " "'finished', but if they switch to another tool, the Magic tool may want to " "undo any temporary changes to the canvas)." msgstr "" #: ../doc-src/MAGIC-API.php:538 msgid "" "These functions could also be used to streamline certain effects; a behind-" "the-scenes copy of the entire canvas could be altered in some way when the " "user first switches to the canvas, and then pieces of that copy could be " "drawn on the canvas when they draw with the Magic tool." msgstr "" #: ../doc-src/MAGIC-API.php:548 msgid "" "Tux Paint will call this function to inform the plugin of the RGB values of " "the currently-selected color in Tux Paint's 'Colors' palette. (It will be " "called whenever one of the plugin's Magic tools that accept colors becomes " "active, and whenever the user picks a new color while such a tool is " "currently active.)" msgstr "" #: ../doc-src/MAGIC-API.php:551 msgid "" "Generally, Magic tools will not alter the canvas in any way when receiving " "an updated color, but it is possible. (For example, the \"Zoom\" and " "\"Perspective\" tools apply effects which uses the current color choice as a " "solid background. The effects may be adjusted with subsequent click/drag " "operations, but you may also adjust the background color, without altering " "the zoom level or perspective, by simply picking a new color.)" msgstr "" #: ../doc-src/MAGIC-API.php:561 msgid "" "Tux Paint will call this function to inform the plugin of the 'Magic' tool " "size option chosen. (It will be called whenever one of the plugin's Magic " "tools that accept sizes becomes active, and whenever the user picks a new " "size while such a tool is currently active.)" msgstr "" #: ../doc-src/MAGIC-API.php:564 msgid "" "Generally, Magic tools will not alter the canvas in any way when receiving " "an updated size, but it is possible." msgstr "" #: ../doc-src/MAGIC-API.php:574 msgid "" "The plugin should apply the appropriate 'Magic' tool on the 'canvas' surface. The (x,y) coordinates are where the mouse was (within the " "canvas) when the mouse button was clicked, and you are told which 'mode' " "your tool is in (i.e., 'MODE_PAINT' or 'MODE_FULLSCREEN)." msgstr "" #: ../doc-src/MAGIC-API.php:577 ../doc-src/MAGIC-API.php:593 msgid "" "The plugin should report back what part of the canvas was affected, by " "filling in the (x,y) and (w,h) elements of 'update_rect'." msgstr "" #: ../doc-src/MAGIC-API.php:580 msgid "" "The contents of the drawing canvas immediately prior to the mouse button " "click is stored within the 'snapshot' canvas." msgstr "" #: ../doc-src/MAGIC-API.php:587 msgid "" "The plugin should apply the appropriate 'Magic' tool on the 'canvas' surface. The (ox,oy) and (x,y) coordinates are the location of the " "mouse at the beginning and end of the stroke." msgstr "" #: ../doc-src/MAGIC-API.php:590 msgid "" "Typically, plugins that let the user \"draw\" effects onto the canvas " "utilize Tux Paint's \"line()\" 'Magic' tool plugin helper " "function to calculate the points of the line between (ox,oy) and (x,y), and " "call another function within the plugin to apply the effect at each point. " "(See \"Tux Paint Functions and Data,\" below)." msgstr "" #: ../doc-src/MAGIC-API.php:596 msgid "" "Note: The contents of the drawing canvas immediately prior to the mouse " "button click remains as it was (when the plugin's \"click()\" " "function was called), and is still available in the 'snapshot' " "canvas." msgstr "" #: ../doc-src/MAGIC-API.php:603 msgid "" "The plugin should apply the appropriate 'Magic' tool on the 'canvas' surface. The (x,y) coordinates are where the mouse was (within the " "canvas) when the mouse button was released." msgstr "" #: ../doc-src/MAGIC-API.php:606 msgid "" "The plugin should report back what part of the canvas was affected, by " "filling in the (x,y) and (w,h) elements of 'update_rect'." msgstr "" #: ../doc-src/MAGIC-API.php:609 msgid "" "Note: The contents of the drawing canvas immediately prior to the " "mouse button click remains as it was (when the plugin's \"click()\" function was called), and is still available in the 'snapshot' " "canvas." msgstr "" #: ../doc-src/MAGIC-API.php:625 msgid "" "Tux Paint provides a number of helper functions that plugins may access via " "the \"magic_api\" structure, sent to all of the plugin's " "functions. (See \"Required Plugin Functions,\" " "above.)" msgstr "" #: ../doc-src/MAGIC-API.php:638 msgid "" "Retreives the pixel value from the (x,y) coordinates of an SDL_Surface. (You " "can use SDL's \"SDL_GetRGB()\" function to convert the Uint32 'pixel' to a " "set of Uint8 RGB values.)" msgstr "" #: ../doc-src/MAGIC-API.php:643 msgid "" "Sets the pixel value at position (x,y) of an SDL_Surface. (You can use SDL's " "\"SDL_MapRGB()\" function to convert a set of Uint8 RGB values to a Uint32 " "'pixel' value appropriate to the destination surface.)" msgstr "" #: ../doc-src/MAGIC-API.php:648 msgid "" "Applies an XOR (exclusive-or) operation to the pixel at coordinates (x,y) of " "the SDL_Surface. Applying an XOR again at the same position will return the " "pixel to the original value. Useful for displaying temporary 'rubberband' " "lines, outlines, and crosshairs, while utilizing a Magic Tool." msgstr "" #: ../doc-src/MAGIC-API.php:654 msgid "" "This accepts an existing SDL surface and creates a new one scaled to an " "arbitrary size. (The original surface remains untouched.)" msgstr "" #: ../doc-src/MAGIC-API.php:657 msgid "" "The \"keep_aspect\" flag can be set to '1' to force the new " "surface to stay the same shape (aspect ratio) as the original, meaning it " "may not be the same width and height you requested. (Check the \"->" "w\" and \"->h\" elements of the output \"SDL_Surface " "*\" to determine the actual size.)" msgstr "" #: ../doc-src/MAGIC-API.php:674 msgid "" "Returns '1' if the (x,y) location is within a circle of a particular radius " "(centered around the origin: (0,0)). Returns '0' otherwise. Useful to " "create 'Magic' tools that affect the canvas with a circular brush shape." msgstr "" #: ../doc-src/MAGIC-API.php:680 msgid "" "This function calculates all points on a line between the coordinates (x1," "y1) and (x2,y2). Every 'step' iterations, it calls the 'callback' function." msgstr "" #: ../doc-src/MAGIC-API.php:683 msgid "" "It sends the 'callback' function the (x,y) coordinates on the line, Tux " "Paint's \"magic_api\" struct (as a \"void *\" " "pointer which you need to send to it), a 'which' value, represening which of " "the plugin's 'Magic' tool is being used, and the current and snapshot " "canvases." msgstr "" #: ../doc-src/MAGIC-API.php:686 msgid "" "Example prototype of a callback function that may be sent to Tux Paint's " "\"line()\" 'Magic' tool plugin helper function:" msgstr "" #: ../doc-src/MAGIC-API.php:692 msgid "" "Example use of the \"line()\" helper (e.g., within a plugin's " "draw() function):" msgstr "" #: ../doc-src/MAGIC-API.php:702 msgid "" "This function allows you to avoid re-processing the same pixels multiple " "times when the user drags the mouse across an area of the canvas, thus " "increasing Tux Paint's response time, especially with math-heavy effects." msgstr "" #: ../doc-src/MAGIC-API.php:705 msgid "" "If your effect's \"click()\", \"drag()\" and/or " "\"release()\" functions take the contents of the source surface " "(\"snapshot\") and always create the same results in the " "desintation surface (\"canvas\"), you should wrap the effect in " "a call to \"api->touched()\"." msgstr "" #: ../doc-src/MAGIC-API.php:708 msgid "" "This function simply returns whether or not it had already been called for " "the same (x,y) coordinates, since the user first clicked the mouse. In other " "words, the first time you call it for a particular (x,y) coordinate, it " "returns '0'. Future calls will return '1' until the user releases the mouse " "button." msgstr "" #: ../doc-src/MAGIC-API.php:711 msgid "" "Note: Magic effects that continuously affect the destination surface " "(\"canvas\") (ignoring the \"snapshot surface) " "have no reason to use this function. The \"Blur\" and \"Smudge\" tools that " "ship with Tux Paint are examples of such effects." msgstr "" #: ../doc-src/MAGIC-API.php:727 #, php-format msgid "" "A string containing the version of Tux Paint that's running (e.g., \"%s\")." msgstr "" #: ../doc-src/MAGIC-API.php:735 msgid "" "Returns the width (canvas_w) and height (canvas_h) " "of the drawing canvas (in pixels)." msgstr "" #: ../doc-src/MAGIC-API.php:740 msgid "A '1' is returned if the mouse button is down; '0' otherwise." msgstr "" #: ../doc-src/MAGIC-API.php:746 msgid "" "This string contains the directory where Tux Paint's data files are stored. " "For example, on Linux, this may be \"/usr/share/tuxpaint/\"." msgstr "" #: ../doc-src/MAGIC-API.php:749 msgid "" "Magic tools should include an icon (see \"get_icon()\", above) " "and are encouraged to include sound effects, it's useful for plugins to know " "where such things are located." msgstr "" #: ../doc-src/MAGIC-API.php:752 msgid "" "When compiling and installing a plugin, the \"tp-magic-config\" " "command-line tool should be used to determine where such data should be " "placed for the installed version of Tux Paint to find them. (See \"Installing,\" below.)" msgstr "" #: ../doc-src/MAGIC-API.php:755 msgid "" "Note: If your plugin is installed locally (e.g., in your \"~/." "tuxpaint/plugins/\" directory), rather than globally (system-wide), " "the \"data_directory\" value will be different. (e.g., \"/" "home/username/.tuxpaint/plugins/data/\")." msgstr "" #: ../doc-src/MAGIC-API.php:772 msgid "" "This function plays a sound (one loaded by the SDL helper library " "\"SDL_mixer\"). It uses SDL_mixer's \"Mix_SetPanning()\" to " "set the volume of the sound on the left and right speakers, based on the " "'pan' and 'dist' values sent to it." msgstr "" #: ../doc-src/MAGIC-API.php:775 msgid "" "A 'pan' of 128 causes the sound to be played at equal volume on " "the left and right speakers. A 'pan' of 0 causes it to be " "played completely on the left, and 255 completely on the right." msgstr "" #: ../doc-src/MAGIC-API.php:778 msgid "" "The 'dist' value affects overall volume. 255 is loudest, and 0 " "is silent." msgstr "" #: ../doc-src/MAGIC-API.php:781 msgid "" "The 'pan' and 'dist' values can be used to " "simulate location and distance of the 'Magic' tool effect." msgstr "" #: ../doc-src/MAGIC-API.php:787 msgid "" "This function stops playing a sound played by playsound(). It " "is useful to silence effects when the user stops using the tool (in your " "'release' function)." msgstr "" #: ../doc-src/MAGIC-API.php:793 #, php-format msgid "" "Call this function to determine whether a magic tool sound effect is still " "currently playing. Can be used by magic tools that pause and unpause their " "sounds (see below) to determine whether it's time to start a new sound " "— call %1$s instead of %2$s." msgstr "" #: ../doc-src/MAGIC-API.php:797 msgid "A '1' is returned if a sound is playing; '0' otherwise." msgstr "" #: ../doc-src/MAGIC-API.php:807 #, php-format msgid "" "Pauses the magic tool sound effect; it may be unpaused to resume playing. " "Useful when a magic tool sound is very long; avoid repeatedly playing just a " "short clip of the beginning when the user draws small strokes by starting " "(%1$s) and stopping (%2$s) the sound. Use %3$s to determine whether you can " "unpause or must play from the start." msgstr "" #: ../doc-src/MAGIC-API.php:821 msgid "Resumes a paused magic tool sound effect, if one was playing." msgstr "" #: ../doc-src/MAGIC-API.php:840 msgid "" "Asks Tux Paint to animate and draw one frame of its progress bar (at the " "bottom of the screen). Useful for routines that may take a long time, to " "provide feedback to the user that Tux Paint has not crashed or frozen." msgstr "" #: ../doc-src/MAGIC-API.php:845 msgid "" "This function notifies Tux Paint of special events. Various values defined " "in \"tp_magic_api.h\" can be 'or'ed together (using C's boolean " "'or': \"|\") and sent to this function." msgstr "" #: ../doc-src/MAGIC-API.php:850 msgid "The contents of the canvas has been flipped vertically." msgstr "" #: ../doc-src/MAGIC-API.php:853 msgid "" "If a 'Starter' image was used as the basis of this image, it should be " "flipped too, and a record of the flip should be stored as part of Tux " "Paint's undo buffer stack. Additionally, the fact that the starter has been " "flipped (or unflipped) should be recorded on disk when the current drawing " "is saved." msgstr "" #: ../doc-src/MAGIC-API.php:858 msgid "" "Similar to SPECIAL_FLIP, but for magic tools that mirror the " "contents of the canvas horizontally." msgstr "" #: ../doc-src/MAGIC-API.php:866 msgid "" "Each time the user clicks in the canvas while using your Magic tool, a new " "snapshot of the canvas is added to the \"Undo\" history. This allows the " "user to click \"Undo\" to return the image to the state it was in just " "before they clicked with your Magic tool. They may click \"Redo\" to bring " "the change back." msgstr "" #: ../doc-src/MAGIC-API.php:869 msgid "" "However, some more sophisticated Magic tools require one or more steps to " "take place before the final \"effect\" is reached. For example, \"Filled " "Polygon\" requires placing at least three connected points, then connecting " "the first and last point together, to create a shape that gets added to the " "canvas. In the meantime, an interactive preview of the shape — an " "outline with large dots representing each point — is drawn onto the " "canvas. (The points may be moved, or even removed, prior to finishing the " "shape.)" msgstr "" #: ../doc-src/MAGIC-API.php:872 msgid "" "The retract_undo() API function may be used by a Magic tool to " "tell it to discard the \"Undo\" snapshot it just took, as a way to prevent " "previews shown during multi-step actions from appearing on the canvas when " "using the \"Undo\" and \"Redo\" commands." msgstr "" #: ../doc-src/MAGIC-API.php:876 msgid "This is an advanced feature." msgstr "" #: ../doc-src/MAGIC-API.php:895 msgid "" "Converts an 8-bit sRGB value (one between 0 and 255) to a linear floating " "point value (between 0.0 and 1.0)." msgstr "" #: ../doc-src/MAGIC-API.php:900 msgid "" "Converts a linear floating point value (one between 0.0 and 1.0) to an 8-bit " "sRGB value (between 0 and 255)." msgstr "" #: ../doc-src/MAGIC-API.php:905 msgid "" "Converts 8-bit sRGB values (between 0 and 255) to floating-point HSV (Hue, " "Saturation and Value) values (Hue between 0.0 and 360.0, and Saturation and " "Value between 0.0 and 1.0)." msgstr "" #: ../doc-src/MAGIC-API.php:910 msgid "" "Converts floating-point HSV (Hue, Saturation and Value) values (Hue between " "0.0 and 360.0, and Saturation and Value between 0.0 and 1.0) to 8-bit sRGB " "values (between 0 and 255)." msgstr "" #: ../doc-src/MAGIC-API.php:915 msgid "" "For more information, refer to the sRGB article at Wikipedia and the HSV Color Space article at Wikipedia." msgstr "" #: ../doc-src/MAGIC-API.php:928 msgid "" "Along with the \"magic_api\" C structure containing functions " "and data described above, the tp_magic_api.h C header file also " "contains some helper macros that you may use." msgstr "" #: ../doc-src/MAGIC-API.php:937 msgid "" "The minimum (min) or maxinum (max) of 'x' and " "'y'. For example, min() will return the value of 'x' if it is " "less than or equal to 'y', otherwise it will return 'y'." msgstr "" #: ../doc-src/MAGIC-API.php:943 msgid "" "A value, clamped to be no smaller than 'lo', and no higher than 'hi'. (That " "is, if 'value' is less than 'lo', then 'lo' will be used; if 'value' is " "greater than 'hi', then 'hi' will be used; otherwise, 'value' will be used.)" msgstr "" #: ../doc-src/MAGIC-API.php:946 msgid "" "Example: red = clamp(0, n, 255); will set the variable " "'red' to be the value of the variable 'n', but without allowing it to become " "less than 0 or greater than 255." msgstr "" #: ../doc-src/MAGIC-API.php:949 msgid "" "Note: This macro is simply a #define of: " "\"(min(max(value,lo),hi))\"." msgstr "" #: ../doc-src/MAGIC-API.php:963 msgid "" "The following is a summary of constant values that are set (via " "\"#define\") within the 'Magic' tool API header file." msgstr "" #: ../doc-src/MAGIC-API.php:970 msgid "" "This integer value represents which version of the Tux Paint 'Magic' tool " "API the header corresponds to." msgstr "" #: ../doc-src/MAGIC-API.php:973 msgid "" "It should be referenced by your magic tool's \"api_version()\" " "function, to inform the running copy of Tux Paint whether or not your plugin " "is compatible." msgstr "" #: ../doc-src/MAGIC-API.php:976 #, php-format msgid "" "Note: This version number does not correspond to Tux Paint's own " "release number (e.g., \"%s\"). The API will not change every time a new " "version of Tux Paint is released, which means plugins compiled for earlier " "versions of Tux Paint will often run under newer versions." msgstr "" #: ../doc-src/MAGIC-API.php:985 msgid "" "These are flags for Tux Paint's \"special_notify()\" helper " "function. They are described above." msgstr "" #: ../doc-src/MAGIC-API.php:1008 msgid "" "Use the C compiler's \"-shared\" command-line option to " "generate a shared object file (\".so\") based on your 'Magic' " "tool plugin's C source code." msgstr "" #: ../doc-src/MAGIC-API.php:1011 msgid "" "Use the \"tp-magic-config --cflags\" command, supplied as part " "of Tux Paint — or in some cases, as part of a \"Tux Paint 'Magic' Tool " "Plugin Development package\" — to provide additional command-line " "flags to your C compiler that will help it build your plugin." msgstr "" #: ../doc-src/MAGIC-API.php:1017 msgid "Command-Line Example" msgstr "" #: ../doc-src/MAGIC-API.php:1022 msgid "" "As a stand-alone command, using the GNU C Compiler and BASH shell, for " "example:" msgstr "" #: ../doc-src/MAGIC-API.php:1032 msgid "" "Note: The characters around the \"tp-" "magic-config\" command are a grave/backtick/backquote " "(\"`\"), and not an apostrophe/" "single-quote (\"'\"). They tell the " "shell to execute the command within (in this case, \"tp-magic-" "config ...\"), and use its output as an argument to the command being " "executed (in this case, \"gcc ...\")." msgstr "" #: ../doc-src/MAGIC-API.php:1039 msgid "Makefile Example" msgstr "" #: ../doc-src/MAGIC-API.php:1044 msgid "" "A snippet from a Makefile to compile a Tux Paint \"Magic\" tool plugin might " "look like this:" msgstr "" #: ../doc-src/MAGIC-API.php:1055 msgid "" "The first line sets up Makefile variable (\"CFLAGS\") that " "contains flags for the compiler. \"-Wall\" asks for all " "compiler warnings to be shown. \"-O2\" asks for level 2 " "optimization. \"($shell tp-magic-config --cflags)\" runs " "\"tp-magic-config\" to retrieve additional compiler flags that " "\"Magic\" tool plugins require. (The \"$(shell ...)\" " "directive is similar to the ` " "(\"grave\") character in the BASH shell examples, above.)" msgstr "" #: ../doc-src/MAGIC-API.php:1059 msgid "" "The next line defines a Makefile target, \"my_plugin.so\", and " "states that it depends on the C source file \"my_plugin.c\". (Any time the C file changes, \"make\" will know to " "recompile it and produce an updated \".so\" file. If the C file " "hadn't changed, it won't bother recompiling.)" msgstr "" #: ../doc-src/MAGIC-API.php:1063 msgid "" "The last line defines the command \"make\" should run when it " "determines that it needs to (re)compile the \".so\" file. " "Here, we're using \"gcc\", with \"-shared and " "\"$(CFLAGS)\" command-line arguments, like above. \"-o " "my_plugin.so\" tells the C compiler that the output file should be " "\"my_plugin.so\". The last argument is the C file to compile, " "in this case \"my_plugin.c\"." msgstr "" #: ../doc-src/MAGIC-API.php:1067 msgid "" "Note: Commands listed below a Makefile target should be intented " "using a single tab character." msgstr "" #: ../doc-src/MAGIC-API.php:1074 msgid "Advanced Makefile" msgstr "" #: ../doc-src/MAGIC-API.php:1079 msgid "An even more generalized Makefile might look like this:" msgstr "" #: ../doc-src/MAGIC-API.php:1092 msgid "" "As before, there are lines that define the command \"make\" " "should run when it determines that it needs to (re)compile the \".so\" file(s). However, more general terms are used..." msgstr "" #: ../doc-src/MAGIC-API.php:1096 msgid "" "\"$(CC)\" gets expanded to your default C compiler (e.g., " "\"gcc\"). \"-shared\" and \"$(CFLAGS)\" are command-line arguments to the compiler, like above. \"-o " "$@\" tells the C compiler what the output file should be; " "\"make\" replaces \"$@\" with the name of the " "target, in this case \"my_plugin_1.so\" or \"my_plugin_2." "so\". And finally, the last argument is the C file to compile; " "\"make\" replaces \"$<\" with the target's " "dependency, in this case \"my_plugin_1.c\" or " "\"my_plugin_2.c\"." msgstr "" #: ../doc-src/MAGIC-API.php:1139 msgid "" "Use the \"tp-magic-config\" command-line tool, supplied as part " "of Tux Paint — or in some cases, as part of a \"Tux Paint 'Magic' Tool " "Plugin Development package\" — to determine where your plugins' files " "should go." msgstr "" #: ../doc-src/MAGIC-API.php:1145 msgid "Shared Object" msgstr "" #: ../doc-src/MAGIC-API.php:1150 msgid "" "Use \"tp-magic-config --pluginprefix\" to determine where the " "plugin shared object (\".so\") files should be installed. The " "value returned by this command will be the global location where the " "installed copy of Tux Paint looks for plugins (e.g., \"/usr/lib/" "tuxpaint/plugins\")." msgstr "" #: ../doc-src/MAGIC-API.php:1154 msgid "" "Alternatively, you may use \"tp-magic-config --localpluginprefix\" to find out where Tux Paint expects to find local plugins for the " "current user (e.g., \"/home/username/.tuxpaint/plugins\")." msgstr "" #: ../doc-src/MAGIC-API.php:1158 ../doc-src/MAGIC-API.php:1187 #: ../doc-src/MAGIC-API.php:1223 msgid "As stand-alone commands, using the BASH shell, for example:" msgstr "" #: ../doc-src/MAGIC-API.php:1167 ../doc-src/MAGIC-API.php:1195 #: ../doc-src/MAGIC-API.php:1231 msgid "" "Note: See the note above regarding the \"`\" (grave) character." msgstr "" #: ../doc-src/MAGIC-API.php:1174 msgid "Documentation" msgstr "" #: ../doc-src/MAGIC-API.php:1179 msgid "" "Use the \"tp-magic-config --plugindocprefix\" command to " "determine where documentation for your \"Magic\" tools should go. The value " "returned by this command will be the location where the documentation to the " "installed copy of Tux Paint is stored. The main documentation includes a " "link to a folder where \"Magic\" tools' documentation is expected to be " "installed

(e.g., \"/usr/share/doc/tuxpaint/magic-docs\")." msgstr "" #: ../doc-src/MAGIC-API.php:1183 msgid "" "Note: It's best to include both HTML and plain-text versions of your " "documentation. An \"html\" subdirectory exists within the " "\"magic-docs\" directory, and is where the HTML versions should " "go." msgstr "" #: ../doc-src/MAGIC-API.php:1199 msgid "" "Note: Currently, there is no \"--localplugindocprefix\" " "option." msgstr "" #: ../doc-src/MAGIC-API.php:1206 msgid "Icons, Sounds and other Data Files" msgstr "" #: ../doc-src/MAGIC-API.php:1211 msgid "" "Use the \"tp-magic-config --dataprefix\" command, supplied as " "part of Tux Paint, to determine where data files (PNG icon, Ogg Vorbis sound " "effects, etc.) should be installed. The value returned by this command will " "be the same as the value of the \"data_directory\" string " "stored within the \"magic_api\" structure that your plugin's " "functions receive (e.g., \"/usr/share/tuxpaint/\")." msgstr "" #: ../doc-src/MAGIC-API.php:1215 msgid "" "For locally-installed plugins (for the current user only), use \"tp-" "magic-config --localdataprefix\". It will return the value of " "\"data_directory\" string that locally-installed plugins will " "see within their \"magic_api\" structure (e.g., \"/home/" "username/.tuxpaint/plugins/data/\")." msgstr "" #: ../doc-src/MAGIC-API.php:1219 msgid "" "Note: Tux Paint's default Magic tool plugins install their data " "within \"magic\" subdirectories of Tux Paint's \"images\" and \"sounds\" data directories (e.g., \"/usr/" "share/tuxpaint/images/magic/\"). You are encouraged to do the same." msgstr "" #: ../doc-src/MAGIC-API.php:1238 msgid "Putting it Together in a Makefile" msgstr "" #: ../doc-src/MAGIC-API.php:1243 msgid "A snippet from a more generalized Makefile might look like this:" msgstr "" #: ../doc-src/MAGIC-API.php:1276 msgid "" "The first three lines set up Makefile variables that contain the paths " "returned by the \"tp-magic-config\" command-line tool. (The " "\"$(shell ...)\" directive is similar to the ` (\"grave\") character in " "the BASH shell examples, above.)" msgstr "" #: ../doc-src/MAGIC-API.php:1280 msgid "" "Below that is an \"install\" target in the Makefile. (Invoked " "by, for example, \"$ sudo make install\" or \"# make " "install\".)" msgstr "" #: ../doc-src/MAGIC-API.php:1284 msgid "" "The \"install\" target uses \"mkdir -p\" to make " "sure that the plugin directory exists, then uses \"cp\" to copy " "all plugin (\".so\") files into it, and invokes \"chmod\" to make sure they are readable." msgstr "" #: ../doc-src/MAGIC-API.php:1288 msgid "" "It then does a similar series of commands to install icon files (\"." "png\" images) and sound effects (\".ogg\" files) into " "subdirectories within Tux Paint's data directory, and to install " "documentation (\".html\" and \".txt\" files) " "within Tux Paint's documentation directory." msgstr "" #: ../doc-src/MAGIC-API.php:1292 msgid "" "Note: The above Makefile example assumes the user will have " "priveleges to install Tux Paint plugins system-wide." msgstr "" #: ../doc-src/MAGIC-API.php:1328 msgid "" "Plugins for Tux Paint may contain more than one effect. If you have " "multiple effects that are similar, it may make sense to place them in one " "plugin file, to reduce overhead and share code." msgstr "" #: ../doc-src/MAGIC-API.php:1332 msgid "" "These following suggestions can help you create plugins that contain " "multiple effects:" msgstr "" #: ../doc-src/MAGIC-API.php:1336 msgid "Use a C \"enum\" to enumerate the effects, and count them." msgstr "" #: ../doc-src/MAGIC-API.php:1339 msgid "ONE_TOOL" msgstr "" #: ../doc-src/MAGIC-API.php:1340 msgid "ANOTHER_TOOL" msgstr "" #: ../doc-src/MAGIC-API.php:1341 msgid "AND_YET_ANOTHER_TOOL" msgstr "" #. Label of enum representing total number of tools we provide #: ../doc-src/MAGIC-API.php:1342 ../doc-src/MAGIC-API.php:1353 #: ../doc-src/MAGIC-API.php:1355 ../doc-src/MAGIC-API.php:1365 #: ../doc-src/MAGIC-API.php:1382 ../doc-src/tp_magic_example_c.php:29 msgid "NUM_TOOLS" msgstr "" #: ../doc-src/MAGIC-API.php:1347 msgid "" "Return the value of \"NUM_TOOLS\" when " "\"get_tool_count()\" is called, and compare \"which\" values sent to other functions with the other enumerated values." msgstr "" #: ../doc-src/MAGIC-API.php:1351 msgid "" "Create arrays of \"NUM_TOOLS\" length to contain effect-" "specific data." msgstr "" #: ../doc-src/MAGIC-API.php:1353 ../doc-src/MAGIC-API.php:1370 #, php-format msgid "my_plugin_snd_filenames[%s]" msgstr "" #: ../doc-src/MAGIC-API.php:1354 msgid "\"one.ogg\", \"another.ogg\", \"yet_another.ogg\"" msgstr "" #: ../doc-src/MAGIC-API.php:1355 ../doc-src/MAGIC-API.php:1372 #: ../doc-src/MAGIC-API.php:1383 msgid "my_plugin_snds" msgstr "" #: ../doc-src/MAGIC-API.php:1360 msgid "" "Use a C \"for\"-loop to load or create the effect-specific data " "(such as loading sound effects during your \"init()\")." msgstr "" #: ../doc-src/MAGIC-API.php:1367 #, php-format msgid "Becomes, for example, %s" msgstr "" #: ../doc-src/MAGIC-API.php:1378 msgid "" "Similarly, do the same to free them later (such as freeing sound effects " "during your \"shutdown()\")." msgstr "" #: ../doc-src/MAGIC-API.php:1388 msgid "" "Use \"which\" values sent to your functions as an index into " "those arrays (e.g., for playing the appropriate sound effect for a tool)." msgstr "" #: ../doc-src/MAGIC-API.php:1394 msgid "" "Note: Even if your plugin currently contains only one effect, it may " "be useful to follow the steps above so that you can add a new variation of " "an effect with little effort. (\"NUM_TOOLS\" will simply be " "'1', your arrays will be of length '1', etc.)" msgstr "" #: ../doc-src/MAGIC-API.php:1423 msgid "" "For more information, check the Tux Paint website: https://tuxpaint.org/, and the Simple DirectMedia Layer " "library website: http://www.libsdl.org/." msgstr "" #: ../doc-src/MAGIC-API.php:1427 msgid "" "Additionally, other Tux Paint developers and users can be found on the " "\"tuxpaint-devel\" and \"tuxpaint-users\" mailing " "lists: https://tuxpaint.org/lists/." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:62 #, php-format msgid "See \"%s\"" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:71 #, php-format msgid "Refer to the \"%s\" man page." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:81 msgid "Definition not yet presented." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:93 msgid "alpha" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:94 msgid "backquote" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:94 ../doc-src/MAGIC-API-glossary.php:95 #: ../doc-src/MAGIC-API-glossary.php:104 ../doc-src/MAGIC-API-glossary.php:372 msgid "grave" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:95 msgid "backtick" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:96 msgid "red" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:97 msgid "green" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:98 msgid "blue" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:99 msgid "hue" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:100 msgid "saturation" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:101 msgid "value" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:102 ../doc-src/MAGIC-API-glossary.php:161 msgid "boolean 'or'" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:103 ../doc-src/MAGIC-API-glossary.php:284 #: ../doc-src/MAGIC-API-glossary.php:311 msgid "dot" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:105 ../doc-src/MAGIC-API-glossary.php:117 #: ../doc-src/MAGIC-API-glossary.php:584 msgid "star" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:106 ../doc-src/MAGIC-API-glossary.php:146 #: ../doc-src/MAGIC-API-glossary.php:287 ../doc-src/MAGIC-API-glossary.php:311 msgid "arrow" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:107 ../doc-src/MAGIC-API-glossary.php:108 #: ../doc-src/MAGIC-API-glossary.php:109 ../doc-src/MAGIC-API-glossary.php:204 msgid "C header file" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:108 msgid "header" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:109 msgid "header file" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:114 ../doc-src/MAGIC-API-glossary.php:122 #, php-format msgid "%1$s (%2$s)" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:114 ../doc-src/MAGIC-API-glossary.php:122 #: ../doc-src/MAGIC-API-glossary.php:128 ../doc-src/MAGIC-API-glossary.php:587 msgid "ampersand" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:114 msgid "pointers" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:116 msgid "" "\"&\". A symbol in C that allows you to refer to the memory " "address of a variable; that is, a pointer. (For example, consider " "\"int i;\". Later, \"&i\" refers to the memory " "where \"i\" is stored, not the value of \"i\" " "itself; it is a 'pointer to \"i\"'.)" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:122 msgid "bitwise operator" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:124 msgid "" "\"&\". A symbol in C that acts as a bitwise \"and\" " "operator. Only bits set in both values will be returned. For example, " "\"11 & 6\" compares the binary values '1011' to '0110'. " "Only the bit in the 2's place is set, so the result is 2 " "('0010')." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:125 ../doc-src/MAGIC-API-glossary.php:153 #: ../doc-src/MAGIC-API-glossary.php:164 ../doc-src/MAGIC-API-glossary.php:172 msgid "bit" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:134 msgid "Application Programming Interface." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:139 msgid "argument" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:141 msgid "A value sent to a function." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:148 msgid "" "\"->\". A symbol in C that references an element within a " "pointer to a struct." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:155 msgid "" "\"Binary digit.\" Bits are the basic storage unit in a computer's memory, " "disk, networking, etc. They represent either 0 or 1. (Compared to a decimal " "digit, which can be anything between 0 and 9.) Just as a series of decimal " "digits can represent a larger number (e.g., \"1\" and \"5\" is fifteen " "(15)), so can bits (e.g., \"1\" and \"0\", is two). In decimal, we go from " "right to left: ones place, tens place, hundreds place, thousands place, etc. " "In binary, it is: ones place, twos place, fours place, eights place, etc." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:156 ../doc-src/MAGIC-API-glossary.php:169 msgid "byte" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:163 msgid "" "A mathematical operation that results in a true value if either operand is " "true. (\"1 | 0\", \"0 | 1\" and \"1 | 1\" all result in \"1\". \"0 | 0\" " "results in \"0\".)" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:171 msgid "" "A unit of memory made up of 8 bits. As a signed value, it can represent -128 " "through 127. As an unsigned value, it can represent 0 through 255. As a " "series of bits, for example, the byte \"00001100\" represents the decimal " "value 12." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:177 msgid "callback" msgstr "" #. FIXME #: ../doc-src/MAGIC-API-glossary.php:184 ../doc-src/MAGIC-API-glossary.php:195 #: ../doc-src/MAGIC-API-glossary.php:200 msgid "C function" msgstr "" #. FIXME #: ../doc-src/MAGIC-API-glossary.php:187 ../doc-src/MAGIC-API-glossary.php:192 #: ../doc-src/MAGIC-API-glossary.php:198 msgid "C function prototype" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:198 msgid "prototype" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:200 msgid "function" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:211 ../doc-src/MAGIC-API-glossary.php:314 msgid "C enumeration" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:213 msgid "" "A construct in C that allows you to label numeric values (usually starting " "at 0 and incrementing by one). (e.g., \"enum { ONE, TWO, THREE };\"" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:218 msgid "channel" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:225 ../doc-src/MAGIC-API-glossary.php:231 #: ../doc-src/MAGIC-API-glossary.php:295 ../doc-src/MAGIC-API-glossary.php:303 msgid "click" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:227 msgid "" "The action of pressing a button on a mouse, tapping a touchscreen, or " "pressing a stylus to a tablet." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:228 ../doc-src/MAGIC-API-glossary.php:292 #: ../doc-src/MAGIC-API-glossary.php:303 msgid "drag" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:228 ../doc-src/MAGIC-API-glossary.php:295 #: ../doc-src/MAGIC-API-glossary.php:300 msgid "release" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:231 msgid "tap" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:235 ../doc-src/MAGIC-API-glossary.php:242 msgid "coordinates" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:237 msgid "" "A set of numbers corresponding to a physical position; for example, in a two-" "dimensional (2D) image, \"X\" and \"Y\" coordinates specify the position " "across (left-to-right) and down the image, respectively. In SDL, the " "coordinates (0,0) is the top-leftmost pixel of a surface." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:241 ../doc-src/MAGIC-API-glossary.php:274 msgid "dimensions" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:246 ../doc-src/MAGIC-API-glossary.php:252 msgid "C pointer" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:248 msgid "" "A variable that contains the location of a piece of memory; usually used to " "'point' to another variable. Since C functions can only return one value as " "a result, pointers are often sent to functions to allow the function to " "change the values of multiple variables. (For example, Tux Paint's " "\"rgbtohsv()\" and \"hsvtorgb()\".)" msgstr "" #. Name of a void* pointer sent to API functions by Tux Paint #: ../doc-src/MAGIC-API-glossary.php:252 ../doc-src/tp_magic_example_c.php:127 msgid "pointer" msgstr "" #. FIXME #: ../doc-src/MAGIC-API-glossary.php:256 ../doc-src/MAGIC-API-glossary.php:262 #: ../doc-src/MAGIC-API-glossary.php:287 ../doc-src/MAGIC-API-glossary.php:311 msgid "C structure" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:258 msgid "" "A construct in C that allows you to declare a new variable 'type' which may " "contain other types within. For example, SDL's \"SDL_Rect\" " "contains four integer values, the coordinates of the rectangle (X,Y), and " "its dimensions (width and height)." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:268 msgid "" "A C statement that defines a substitution that can occur later in the code. " "Generally used for constant values (e.g., \"#define RADIUS 16\"; all instances of \"RADIUS\" will be replaced with " "\"16\"), but can also be used to create macros. Typically " "placed within C header files." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:276 msgid "" "The size of an object, in terms of its width (left to right) and height (top " "to bottom)." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:286 msgid "" "\".\". A symbol in C that references an element within a struct." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:294 msgid "" "The action of moving a mouse while the button remains held, or moving a " "finger or stylus across a screen or tablet, without removing it." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:302 msgid "" "The action of releasing a mouse button, or removing a finger or stylus from " "a screen or tablet." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:308 msgid "element" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:310 msgid "" "A variable stored within a C structure. (Example: \"w\" and " "\"h\" elements of SDL_Surface store the surface's width and " "height, respectively.)" msgstr "" #. FIXME #: ../doc-src/MAGIC-API-glossary.php:315 ../doc-src/MAGIC-API-glossary.php:320 #: ../doc-src/MAGIC-API-glossary.php:331 msgid "floating point" msgstr "" #. FIXME #: ../doc-src/MAGIC-API-glossary.php:316 ../doc-src/MAGIC-API-glossary.php:323 #: ../doc-src/MAGIC-API-glossary.php:328 msgid "integer" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:338 msgid "" "An SDL_Surface element (a pointer to an SDL_PixelFormat structure) that contains information about a surface; for example, the " "number of bits used to represent each pixel)." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:345 msgid "" "A C function that frees (deallocates) memory allocated by other C functions " "(such as \"strdup()\")." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:348 ../doc-src/MAGIC-API-glossary.php:351 msgid "GNU C Compiler" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:353 msgid "" "The GNU C compiler, a portable Open Source package for compiling and linking " "programs written in the C programming language." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:359 msgid "" "GNU Image Manipulation Program, an Open Source image manipulation and paint " "program." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:366 msgid "An Open Source image manipulation and paint program." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:374 msgid "" "The \"`\" character; used by the BASH " "shell to use the output of a command as the command-line arguments to " "another." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:380 msgid "The \"Bourne Again Shell\", a Unix shell and command language." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:383 msgid "shell" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:388 msgid "Hue, Saturation and Value." msgstr "" #. FIXME #: ../doc-src/MAGIC-API-glossary.php:389 ../doc-src/MAGIC-API-glossary.php:396 #: ../doc-src/MAGIC-API-glossary.php:403 msgid "colorspace" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:395 msgid "Red, Green, Blue, and Alpha." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:412 msgid "" "An SDL_image function that loads an image file (e.g., a PNG) and returns it " "as an \"SDL_Surface *\"." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:418 msgid "" "A C statement that asks the compiler to read the contents of another file " "(usually a header file)." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:425 msgid "linear" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:431 msgid "macro" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:433 msgid "" "A C construct that looks similar to a C function, but is simply a #define " "that is expanded 'inline'. For example, if you declared the macro " "\"#define ADD(A,B) ((A)+(B))\", and then used it with \"c " "= ADD(1,2);\", that line of code would literally expand to \"c " "= ((1) + (2));\", or more simply, \"c = 1 + 2;\"." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:439 msgid "" "A C structure that is passed along to a plugin's functions that exposes data " "and functions within the running copy of Tux Paint." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:445 msgid "" "A utility that automatically determines which pieces of a larger program " "need to be recompiled, and issues the commands to recompile them." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:452 msgid "" "A text file used by the \"make\" utility; it describes the relationships " "among files in your program, and the commands for updating each file. (For " "example, to compile a human-readable source-code file into a computer-" "readable executable program file.)" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:456 msgid "Magic tool" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:458 msgid "" "One of a number of effects or drawing tools in Tux Paint, made available via " "the \"Magic\" tool button." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:464 msgid "" "(A pointer to) a C structure defined by SDL_mixer that contains a sound." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:470 msgid "" "An SDL_mixer function that frees (deallocates) memory allocated for an " "SDL_mixer sound 'chunk' (\"Mix_Chunk *\")." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:476 msgid "" "An SDL_mixer function that loads a sound file (WAV, Ogg Vorbis, etc.) and " "returns it as a \"Mix_Chunk *\"." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:480 msgid "namespace" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:486 msgid "plugin" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:491 msgid "Ogg Vorbis" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:512 msgid "" "Portable Network Graphics. An extensible file format for the lossless, " "portable, well-compressed storage of raster images. It's the file format Tux " "Paint uses to save images, and for its brushes and stamps. It's an easy way " "to store 32bpp RGBA images (24bpp true color with full 8bpp alpha " "transparency), excellent for use in graphics programs like Tux Paint." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:521 msgid "" "A libSDL function that frees (deallocates) memory allocated for an SDL " "surface (\"SDL_Surface *\")." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:528 msgid "" "A libSDL function that, given a Uint32 pixel value (e.g., one " "returned from the Tux Paint's Magic tool API helper function " "\"getpixel()\"), the format of the surface the pixel was taken " "from, and pointers to three Uint8 variables, will place the " "Red, Green and Blue (RGB) values of the pixel into the three Uint8 variables. (Example: \"SDL_GetRGB(getpixel(surf, x, y), surf->" "format, &r, &g, &b);\".)" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:535 msgid "" "A libSDL function that, given the format of a surface and Uint8 " "values representing Red, Green and Blue values for a pixel, returns a " "Uint32 pixel value that can be placed in the surface (e.g., " "using Tux Paint's Magic tool API helper function \"putpixel()\"). (Example: \"putpixel(surf, x, y, SDL_MapRGB(surf->format, " "r, g, b));\".)" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:542 msgid "" "A library on top of libSDL that can load various kinds of image files (e.g., " "PNG) and return them as an \"SDL_Surface *\"." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:548 msgid "" "A library on top of libSDL that can load various kinds of sound files (WAV, " "Ogg Vorbis, etc.) and play back multiple sounds at once (mix them)." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:554 msgid "" "A C structure defined by libSDL that represents a rectangular area. It " "contains elements representing the coordinates of the top left corner of the " "rectange (x,y) and the dimensions of the rectangle (w,h)." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:560 msgid "" "(A pointer to) a C structure defined by libSDL that contains a drawing " "surface." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:564 ../doc-src/MAGIC-API-glossary.php:569 msgid "shared object" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:566 msgid "" "A piece of code that's compiled separately from the main application, and " "loaded dynamically, at runtime." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:574 msgid "" "The Simple DirectMedia Layer (libSDL) is a programming library that provides " "portable low-level access to a video framebuffer, audio output, and mouse " "and keyboard input. (See: http://www." "libsdl.org/)" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:580 #, php-format msgid "" "A C function, related to \"printf()\", which takes a 'format' string and one " "or more additional arguments, and puts them together. \"snprintf()\" takes " "the resulting output and stores it into a string, making sure not to go " "beyond the string's buffer size (which must also be supplied). For example, " "assume a string \"char str[20];\" has been declared; " "\"snprintf(str, 20, \"Name: %s, Age: %d\", \"Bill\", 32);\" " "will store \"Name: Bill, Age: 32\" into 'str'." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:586 msgid "" "\"*\". A symbol in C that, when used in the declaration of " "variables (e.g., arguments to a function), denotes that the variable is a " "pointer. (For example, \"int * p;\" means that \"p\" is a pointer to an integer.) When used next to a pointer, it " "'dereferences' the variable. (For example, later \"*p = 50;\" " "assigns the value of 50 to the memory that \"p\" points to; it " "does not change the value of \"p\", which is still a pointer to " "an integer. In essence, it changed the integer that's being pointed to.)" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:593 msgid "" "A C function that allocates enough memory to store a copy of a string, " "copies the string to it, and returns a \"char *\" pointer to " "the new copy." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:599 msgid "" "A header file that defines Tux Paint's Magic tool API. Plugins must " "'#include' it." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:605 msgid "" "A command-line program that provides information about the installed version " "of Tux Paint to plugin developers (such as what C compiler flags they should " "compile with, and where plugin shared objects and data files should be " "installed)." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:611 msgid "" "A 32-bit, unsigned integer (defined by libSDL). In other words, four bytes " "that can represent 0 through 4,294,967,295. (Typically used to hold enough " "information to store three or four bytes representing a pixel's color; i.e., " "RBGA value)." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:618 msgid "" "An 8-bit, unsigned integer (defined by libSDL). In other words, a byte that " "can represent 0 through 255." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:623 msgid "unsigned" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:625 msgid "" "In C, a variable that can store a numeric value can be declared as either " "\"signed\" (the default), or \"unsigned\". In the former case, one bit of " "the value is used to denote the sign of the value (either positive or " "negative). In the latter case, the value can only be positive, but benefits " "from one extra bit of storage for the number. A signed byte (8 bits), for " "example, can represent any number between -128 and 127. An unsigned byte can " "go up to 255, but it cannot go below 0. For the purposes of graphics in SDL, " "unsigned values should be used for RGB values, since each channel (red, " "green and blue) may be between 0 (off) and 255 (brightest)." msgstr "" #: ../doc-src/MAGIC-API-glossary.php:630 msgid "variable" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:632 msgid "" "A construct in computer programming that contains a value which can be " "referenced again later by referring to the variable's name, and typically " "changed later. For example, a variable to hold someone's age could be " "declared as an integer: \"int age;\". It can be examined later " "— e.g., \"if (age >= 18) { /* they are an adult */ } else { /" "* they are not an adult */ }\" — as well as modified later " "— e.g., age = 32; /* set age to 32 */" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:690 #, php-format msgid "See also: \"%s\"" msgstr "" #: ../doc-src/MAGIC-API-glossary.php:692 msgid "See also:" msgstr "" #: ../doc-src/tp_magic_example_c.php:4 msgid "An example of a \"Magic\" tool plugin for Tux Paint" msgstr "" #: ../doc-src/tp_magic_example_c.php:9 msgid "Inclusion of header files" msgstr "" #. Describing purpose of some #include directives #: ../doc-src/tp_magic_example_c.php:13 ../doc-src/tp_magic_example_c.php:14 #, php-format msgid "For \"%s\"" msgstr "" #. Describes purpose of "tp_magic_api.h" #include #: ../doc-src/tp_magic_example_c.php:16 msgid "Tux Paint \"Magic\" tool API header" msgstr "" #. Describes purpose of "SDL_image.h" #include #: ../doc-src/tp_magic_example_c.php:17 msgid "For IMG_Load(), to load our PNG icon" msgstr "" #. Describes purpose of "SDL_mixer.h" #include #: ../doc-src/tp_magic_example_c.php:18 msgid "For Mix_LoadWAV(), to load our sound effects" msgstr "" #: ../doc-src/tp_magic_example_c.php:21 msgid "Tool Enumerations:" msgstr "" #. Label of enum representing one of the example tools #: ../doc-src/tp_magic_example_c.php:27 msgid "TOOL_ONE" msgstr "" #. Label of enum representing one of the example tools #: ../doc-src/tp_magic_example_c.php:28 msgid "TOOL_TWO" msgstr "" #. Describes how a particular enum ends up represented as an int value #: ../doc-src/tp_magic_example_c.php:34 ../doc-src/tp_magic_example_c.php:35 #: ../doc-src/tp_magic_example_c.php:36 #, php-format msgid "Becomes '%d'" msgstr "" #: ../doc-src/tp_magic_example_c.php:40 msgid "Lists of filenames for sounds and icons to load at startup:" msgstr "" #. Name of char* array of sound file filenames #: ../doc-src/tp_magic_example_c.php:42 msgid "sound_filenames" msgstr "" #: ../doc-src/tp_magic_example_c.php:44 ../doc-src/tp_magic_example_c.php:50 msgid "tool_one" msgstr "" #: ../doc-src/tp_magic_example_c.php:45 ../doc-src/tp_magic_example_c.php:51 msgid "tool_two" msgstr "" #. Name of char* array of icon filenames #: ../doc-src/tp_magic_example_c.php:48 msgid "icon_filenames" msgstr "" #: ../doc-src/tp_magic_example_c.php:56 #, php-format msgid "" "NOTE: We use a macro called \"%s\" below in some arrays of strings (char " "*'s) that hold the names and descriptions of our \"Magic\" tools. This " "allows the strings to be localized into other languages." msgstr "" #: ../doc-src/tp_magic_example_c.php:60 msgid "A list of names for the tools" msgstr "" #. Name of char* array of tool names #: ../doc-src/tp_magic_example_c.php:62 msgid "tool_names" msgstr "" #. Name of one of the example tools #: ../doc-src/tp_magic_example_c.php:64 msgid "A tool" msgstr "" #. Name of one of the example tools #: ../doc-src/tp_magic_example_c.php:65 msgid "Another tool" msgstr "" #: ../doc-src/tp_magic_example_c.php:69 msgid "" "How to group the tools with other similar tools, within the 'Magic' selector:" msgstr "" #. Name of int array of which group each tool belongs to #: ../doc-src/tp_magic_example_c.php:71 msgid "tool_groups" msgstr "" #: ../doc-src/tp_magic_example_c.php:78 msgid "A list of descriptions of the tools" msgstr "" #. Name of char* array of tool descriptions #: ../doc-src/tp_magic_example_c.php:80 msgid "tool_descriptions" msgstr "" #. Description of one of the example tools #: ../doc-src/tp_magic_example_c.php:82 ../doc-src/tp_magic_example_c.php:83 #, php-format msgid "This is example tool number %d." msgstr "" #: ../doc-src/tp_magic_example_c.php:88 msgid "Our global variables:" msgstr "" #: ../doc-src/tp_magic_example_c.php:91 msgid "Sound effects:" msgstr "" #. Name of Mix_Chunk* array of sound file data #: ../doc-src/tp_magic_example_c.php:92 msgid "sound_effects" msgstr "" #: ../doc-src/tp_magic_example_c.php:95 msgid "" "The current color (an \"RGB\" -- red, green, blue -- value) the user has " "selected in Tux Paint (for tool 1):" msgstr "" #: ../doc-src/tp_magic_example_c.php:98 msgid "The size the user has selected in Tux Paint (for tool 2):" msgstr "" #. Part of the name of size-related variables #: ../doc-src/tp_magic_example_c.php:99 msgid "size" msgstr "" #: ../doc-src/tp_magic_example_c.php:103 msgid "Our local function prototypes:" msgstr "" #: ../doc-src/tp_magic_example_c.php:107 msgid "" "These functions are called by other functions within our plugin, so we " "provide a 'prototype' of them, so the compiler knows what they accept and " "return. This lets us use them in other functions that are declared _before_ " "them." msgstr "" #. Name of int argument sent to API functions by Tux Paint, for which tool is being interacted-with #: ../doc-src/tp_magic_example_c.php:112 msgid "which" msgstr "" #. Name of int argument sent to API functions by Tux Paint, for which mode a tool is in #: ../doc-src/tp_magic_example_c.php:115 msgid "mode" msgstr "" #. Name of SDL_Surface* argument sent to API functions by Tux Paint, the drawing canvas; the target where effects should go #: ../doc-src/tp_magic_example_c.php:118 msgid "canvas" msgstr "" #. Name of SDL_Surface* argument sent to API functions by Tux Paint, a snapshot of the drawing canvas prior to effects being applied #: ../doc-src/tp_magic_example_c.php:121 msgid "snapshot" msgstr "" #. Name of SDL_Rect* argument sent to API functions by Tux Paint, where the rectangle surrounding updates to the canvas will be plugged in by the API #: ../doc-src/tp_magic_example_c.php:124 ../doc-src/tp_magic_example_c.php:443 msgid "update_rect" msgstr "" #. Name of a local variable for storing filenames (concantation of data path + name of individual file) #: ../doc-src/tp_magic_example_c.php:130 msgid "filename" msgstr "" #. Name of an int argument representing the old X coordinate of the mouse (vs plain "x") #: ../doc-src/tp_magic_example_c.php:133 msgid "old_x" msgstr "" #. Name of an int argument representing the old Y coordinate of the mouse (vs plain "y") #: ../doc-src/tp_magic_example_c.php:136 msgid "old_y" msgstr "" #. Name of a function that acts as our Magic tool's callback to the Tux Paint API's line() function #: ../doc-src/tp_magic_example_c.php:144 msgid "line_callback" msgstr "" #: ../doc-src/tp_magic_example_c.php:150 msgid "Setup Functions:" msgstr "" #: ../doc-src/tp_magic_example_c.php:154 msgid "API Version check" msgstr "" #: ../doc-src/tp_magic_example_c.php:156 msgid "" "The running copy of Tux Paint that has loaded us first asks us what version " "of the Tux Paint 'Magic' tool plugin API we were built against. If it deems " "us compatible, we'll be used!" msgstr "" #: ../doc-src/tp_magic_example_c.php:158 #, php-format msgid "" "All we need to do here is return \"%1$s\", which is defined (%2$s) in the " "header file \"%3$s\"." msgstr "" #: ../doc-src/tp_magic_example_c.php:168 msgid "Initialization" msgstr "" #: ../doc-src/tp_magic_example_c.php:170 #, php-format msgid "" "This happens once, when Tux Paint starts up and is loading all of the " "'Magic' tool plugins. (Assuming what we returned from %s was acceptable!)" msgstr "" #: ../doc-src/tp_magic_example_c.php:172 #, php-format msgid "" "All we're doing in this example is loading our sound effects, which we'll " "use later (in %1$s, %2$s, and %3$s) when the user is using our Magic tools." msgstr "" #: ../doc-src/tp_magic_example_c.php:174 #, php-format msgid "" "The memory we allocate here to store the sounds will be freed (aka released, " "aka deallocated) when the user quits Tux Paint, when our %s function is " "called." msgstr "" #. Name of a Uint8 argument containg a bitmask of disabled Tux Paint features #: ../doc-src/tp_magic_example_c.php:179 msgid "disabled_features" msgstr "" #. Name of a Uint8 argument containing Tux Paint's complexity/expertise level #: ../doc-src/tp_magic_example_c.php:181 msgid "complexity_level" msgstr "" #: ../doc-src/tp_magic_example_c.php:191 ../doc-src/tp_magic_example_c.php:232 #, php-format msgid "" "Assemble the filename from the \"%s[]\" array into a full path to a real " "file." msgstr "" #: ../doc-src/tp_magic_example_c.php:193 #, php-format msgid "" "Use \"%1$s\" to figure out where our sounds should be. (The \"%2$s\" command " "would have told us when we installed our plugin and its data.)" msgstr "" #: ../doc-src/tp_magic_example_c.php:198 #, php-format msgid "Trying to load %s sound file" msgstr "" #: ../doc-src/tp_magic_example_c.php:200 msgid "Try to load the file!" msgstr "" #: ../doc-src/tp_magic_example_c.php:210 msgid "Report our tool count" msgstr "" #: ../doc-src/tp_magic_example_c.php:212 #, php-format msgid "" "Tux Paint needs to know how many 'Magic' tools we'll be providing. Return " "that number here. (We simply grab the value of '%s' from our 'enum' above!)" msgstr "" #: ../doc-src/tp_magic_example_c.php:214 msgid "" "When Tux Paint is starting up and loading plugins, it will call some of the " "following setup functions once for each tool we report." msgstr "" #: ../doc-src/tp_magic_example_c.php:223 msgid "Load our icons" msgstr "" #: ../doc-src/tp_magic_example_c.php:225 msgid "" "When Tux Paint is starting up and loading plugins, it asks us to provide " "icons for the 'Magic' tool buttons." msgstr "" #: ../doc-src/tp_magic_example_c.php:234 msgid "" "Use \"api->data_directory\" to figure out where our sounds should be. (The " "\"tp-magic-config --dataprefix\" command would have told us when we " "installed our plugin and its data.)" msgstr "" #: ../doc-src/tp_magic_example_c.php:236 #, php-format msgid "" "We use \"%s\" (which of our tools Tux Paint is asking about) as an index " "into the array." msgstr "" #: ../doc-src/tp_magic_example_c.php:241 #, php-format msgid "Trying to load %s icon" msgstr "" #: ../doc-src/tp_magic_example_c.php:243 msgid "Try to load the image, and return the results to Tux Paint:" msgstr "" #: ../doc-src/tp_magic_example_c.php:250 msgid "Report our 'Magic' tool names" msgstr "" #: ../doc-src/tp_magic_example_c.php:252 msgid "" "When Tux Paint is starting up and loading plugins, it asks us to provide " "names (labels) for the 'Magic' tool buttons." msgstr "" #. Name of char* variable that will contain the English name of the Magic tool #: ../doc-src/tp_magic_example_c.php:258 msgid "our_name_english" msgstr "" #. Name of char* variable that will contain the localized name of the Magic tool #: ../doc-src/tp_magic_example_c.php:260 msgid "our_name_localized" msgstr "" #: ../doc-src/tp_magic_example_c.php:266 #, php-format msgid "Get our name from the \"%s[]\" array." msgstr "" #: ../doc-src/tp_magic_example_c.php:268 ../doc-src/tp_magic_example_c.php:298 #: ../doc-src/tp_magic_example_c.php:334 #, php-format msgid "" "We use '%s' (which of our tools Tux Paint is asking about) as an index into " "the array." msgstr "" #: ../doc-src/tp_magic_example_c.php:274 msgid "Return a localized (aka translated) version of our name, if possible." msgstr "" #: ../doc-src/tp_magic_example_c.php:276 #, php-format msgid "We send \"%s\" the English version of the name from our array." msgstr "" #: ../doc-src/tp_magic_example_c.php:282 ../doc-src/tp_magic_example_c.php:348 msgid "" "Finally, duplicate the string into a new section of memory, and send it to " "Tux Paint. (Tux Paint keeps track of the string and will free it for us, so " "we have one less thing to keep track of.)" msgstr "" #: ../doc-src/tp_magic_example_c.php:289 msgid "Report our 'Magic' tool groups" msgstr "" #: ../doc-src/tp_magic_example_c.php:291 msgid "" "When Tux Paint is starting up and loading plugins, it asks us to specify " "where the tool should be grouped." msgstr "" #: ../doc-src/tp_magic_example_c.php:296 #, php-format msgid "Return our group, found in the \"%s[]\" array." msgstr "" #: ../doc-src/tp_magic_example_c.php:305 msgid "Return grouping/ordering number" msgstr "" #: ../doc-src/tp_magic_example_c.php:307 #, php-format msgid "" "When Tux Paint is starting up and loading plugins, it asks us to provide a " "numeric value used for sorting 'Magic' tools within a group. Tools will be " "ordered based on this number, and those with the same number will be sorted " "alphabetically by their localized name (see '%s')." msgstr "" #: ../doc-src/tp_magic_example_c.php:316 msgid "Report our 'Magic' tool descriptions" msgstr "" #: ../doc-src/tp_magic_example_c.php:318 msgid "" "When Tux Paint is starting up and loading plugins, it asks us to provide " "descriptions of each 'Magic' tool." msgstr "" #. Name of a char* variable to hold the Magic tool's description, in English (from C source) #: ../doc-src/tp_magic_example_c.php:324 msgid "our_desc_english" msgstr "" #. Name of a char* variable to hold the Magic tool's description, localized via gettext() #: ../doc-src/tp_magic_example_c.php:326 msgid "our_desc_localized" msgstr "" #: ../doc-src/tp_magic_example_c.php:332 #, php-format msgid "Get our description from the \"%s[]\" array." msgstr "" #: ../doc-src/tp_magic_example_c.php:340 msgid "" "Return a localized (aka translated) version of our description, if possible." msgstr "" #: ../doc-src/tp_magic_example_c.php:342 #, php-format msgid "We send \"%s\" the English version of the description from our array." msgstr "" #: ../doc-src/tp_magic_example_c.php:355 msgid "Report whether we accept colors" msgstr "" #: ../doc-src/tp_magic_example_c.php:366 msgid "Report what modes we work in" msgstr "" #: ../doc-src/tp_magic_example_c.php:371 msgid "" "Both of our tools are painted (neither affect the full-screen), so we're " "always returning 'MODE_PAINT'" msgstr "" #: ../doc-src/tp_magic_example_c.php:378 msgid "Report whether the tools offer sizing options" msgstr "" #: ../doc-src/tp_magic_example_c.php:389 msgid "Return our default sizing option" msgstr "" #: ../doc-src/tp_magic_example_c.php:398 msgid "Shut down" msgstr "" #: ../doc-src/tp_magic_example_c.php:400 #, php-format msgid "" "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 startup " "(in our %s() function), so we should free the memory used by them now." msgstr "" #: ../doc-src/tp_magic_example_c.php:407 #, php-format msgid "" "Free (aka release, aka deallocate) the memory used to store the sound " "effects that we loaded during %s:" msgstr "" #: ../doc-src/tp_magic_example_c.php:414 msgid "Functions that respond to events in Tux Paint:" msgstr "" #: ../doc-src/tp_magic_example_c.php:417 msgid "Affect the canvas on click:" msgstr "" #: ../doc-src/tp_magic_example_c.php:425 msgid "" "In our case, a single click (which is also the start of a drag!) is " "identical to what dragging does, but just at one point, rather than across a " "line." msgstr "" #: ../doc-src/tp_magic_example_c.php:427 #, php-format msgid "" "So we 'cheat' here, by calling our \"%s()\" function with (x,y) for both the " "beginning and end points of a line." msgstr "" #: ../doc-src/tp_magic_example_c.php:434 msgid "Affect the canvas on drag:" msgstr "" #. Name of an int variable to hold a temporary value #: ../doc-src/tp_magic_example_c.php:437 msgid "temp" msgstr "" #: ../doc-src/tp_magic_example_c.php:446 #, php-format msgid "Call Tux Paint's \"%s\" (line-traversing) function." msgstr "" #: ../doc-src/tp_magic_example_c.php:448 #, php-format msgid "" "It will calculate a straight line between (%1$s,%2$s) and (x,y). Every N " "steps along that line (in this case, N is '1'), it will call _our_ function, " "\"%3$s()\", and send the current X,Y coordinates along the line, as well as " "other useful things (which of our 'Magic' tools is being used and the " "current and snapshot canvases)." msgstr "" #: ../doc-src/tp_magic_example_c.php:461 #, php-format msgid "" "If we need to, swap the X and/or Y values, so that the coordinates (%1$s," "%2$s) is always the top left, and the coordinates (x,y) is always the bottom " "right, so the values we put inside \"%3$s\" make sense:" msgstr "" #: ../doc-src/tp_magic_example_c.php:481 #, php-format msgid "" "Fill in the elements of the \"%s\" SDL_Rect structure that Tux Paint is " "sharing with us, therefore telling Tux Paint which part of the canvas has " "been modified and should be updated." msgstr "" #: ../doc-src/tp_magic_example_c.php:497 msgid "Play the appropriate sound effect" msgstr "" #: ../doc-src/tp_magic_example_c.php:499 msgid "" "We're calculating a value between 0-255 for where the mouse is horizontally " "across the canvas (0 is the left, ~128 is the center, 255 is the right)." msgstr "" #: ../doc-src/tp_magic_example_c.php:501 #, php-format msgid "" "These are the exact values Tux Paint's \"%s()\" wants, to determine what " "speaker to play the sound in. (So the sound will pan from speaker to speaker " "as you drag the mouse around the canvas!)" msgstr "" #: ../doc-src/tp_magic_example_c.php:504 msgid "Left/right pan" msgstr "" #: ../doc-src/tp_magic_example_c.php:505 msgid "Near/far distance (loudness)" msgstr "" #: ../doc-src/tp_magic_example_c.php:509 msgid "Affect the canvas on release:" msgstr "" #: ../doc-src/tp_magic_example_c.php:517 msgid "" "Neither of our effects do anything special when the mouse is released from a " "click or click-and-drag, so there's no code here..." msgstr "" #: ../doc-src/tp_magic_example_c.php:523 msgid "Accept colors" msgstr "" #: ../doc-src/tp_magic_example_c.php:525 msgid "" "When any of our 'Magic' tools are activated by the user, if that tool " "accepts colors, the current color selection is sent to us." msgstr "" #: ../doc-src/tp_magic_example_c.php:527 msgid "" "Additionally, if one of our color-accepting tools is active when the user " "changes their chosen, we'll be informed of that as well." msgstr "" #: ../doc-src/tp_magic_example_c.php:529 msgid "" "The color comes in as RGB (red, green, and blue) values from 0 (darkest) to " "255 (brightest)." msgstr "" #: ../doc-src/tp_magic_example_c.php:534 msgid "" "We simply store the RGB values in the global variables we declared at the " "top of this file." msgstr "" #: ../doc-src/tp_magic_example_c.php:544 msgid "Accept sizes" msgstr "" #: ../doc-src/tp_magic_example_c.php:546 msgid "" "When any of our 'Magic' tools are activated by the user, if that tool " "offer's sizes, the current size selection is sent to us." msgstr "" #: ../doc-src/tp_magic_example_c.php:548 msgid "" "Additionally, if the user changes the tool's size, we'll be informed of that " "as well." msgstr "" #: ../doc-src/tp_magic_example_c.php:550 #, php-format msgid "" "The size comes in as an unsigned integer (%1$s) between 1 and the value " "returned by our %2$s() function during setup." msgstr "" #: ../doc-src/tp_magic_example_c.php:555 msgid "" "Store the new size into the global variable we declared at the top of this " "file." msgstr "" #: ../doc-src/tp_magic_example_c.php:562 msgid "The Magic Effect Routines!" msgstr "" #: ../doc-src/tp_magic_example_c.php:566 msgid "Our 'callback' function" msgstr "" #: ../doc-src/tp_magic_example_c.php:568 msgid "" "We do the 'work' in this callback. Our plugin file has just one. Some " "'Magic' tool plugins may have more, depending on the tools they're " "providing. Some have none (since they're not click-and-drag painting-style " "tools)." msgstr "" #: ../doc-src/tp_magic_example_c.php:570 msgid "" "Our callback function gets called once for every point along a line between " "the mouse's previous and current position, as it's being dragged." msgstr "" #: ../doc-src/tp_magic_example_c.php:572 #, php-format msgid "" "Our callback pays attention to '%s' to determine which of our plugin's tools " "is currently selected." msgstr "" #: ../doc-src/tp_magic_example_c.php:578 #, php-format msgid "" "For technical reasons, we can't accept a pointer to the Tux Paint API's " "\"%s\" struct, like the other functions do." msgstr "" #: ../doc-src/tp_magic_example_c.php:580 #, php-format msgid "" "Instead, we receive a 'generic' pointer (a \"%1$s\"). The line below " "declares a local \"%2$s\" pointer variable called \"api\", and then assigns " "it to the value of the 'generic' pointer we received." msgstr "" #: ../doc-src/tp_magic_example_c.php:582 #, php-format msgid "" "The \"%1$s\" seen below casts the generic \"%2$s\" pointer into the 'type' " "of pointer we want, a pointer to a \"%3$s\" struct.)" msgstr "" #: ../doc-src/tp_magic_example_c.php:588 #, php-format msgid "" "This function handles both of our tools, so we need to check which is being " "used right now. We compare the '%s' argument that Tux Paint sends to us " "with the values we enumerated above." msgstr "" #: ../doc-src/tp_magic_example_c.php:594 msgid "" "Tool number 1 simply draws a single pixel at the (x,y) location. It acts as " "a 1x1 pixel brush." msgstr "" #: ../doc-src/tp_magic_example_c.php:602 #, php-format msgid "" "We use \"%1$s()\" to convert the RGB value we receive from Tux Paint for the " "user's current color selection to a '%2$s' pixel value we can send to Tux " "Paint's \"%3$s()\" function." msgstr "" #: ../doc-src/tp_magic_example_c.php:608 msgid "" "Tool number 2 copies a square of pixels (of the size chosen by the user) " "from the opposite side of the canvas and puts it under the cursor." msgstr "" #: ../doc-src/tp_magic_example_c.php:621 #, php-format msgid "" "Here we have simply use Tux Paint's \"%1$s()\" routine to pull pixel values " "from the '%2$s', and then \"%3$s()\" to draw them right into the '%4$s'." msgstr "" #: ../doc-src/tp_magic_example_c.php:623 #, php-format msgid "" "Note: %1$s() and %2$s() are safe to use, even if your X,Y values are outside " "of the SDL surface (e.g., negative, or greater than the surface's width and/" "or height)." msgstr "" #: ../doc-src/tp_magic_example_c.php:631 msgid "Switch-In event" msgstr "" #: ../doc-src/tp_magic_example_c.php:633 msgid "" "This happens whenever a Magic tool is enabled, either because the user just " "selected it, or they just came back to 'Magic' after using another tool (e." "g., Brush or Text), and this was the most-recently selected Magic tool." msgstr "" #: ../doc-src/tp_magic_example_c.php:635 ../doc-src/tp_magic_example_c.php:651 msgid "" "(This also applies to momentary tools, like Undo and Redo, and image-" "changing tools such as New and Open.)" msgstr "" #: ../doc-src/tp_magic_example_c.php:637 #, php-format msgid "" "It also happens when a Magic tool's mode changes (we will first receive a " "call to '%s()', below, for the old mode)." msgstr "" #: ../doc-src/tp_magic_example_c.php:639 ../doc-src/tp_magic_example_c.php:657 msgid "" "Our example doesn't do anything when we switch to, or away from, our Magic " "tools, so we just do nothing here." msgstr "" #: ../doc-src/tp_magic_example_c.php:647 msgid "Switch-Out event" msgstr "" #: ../doc-src/tp_magic_example_c.php:649 msgid "" "This happens whenever a Magic tool is disabled, either because the user " "selected a different Magic tool, or they selected a completely different " "tool (e.g., Brush or Text)." msgstr "" #: ../doc-src/tp_magic_example_c.php:653 #, php-format msgid "(And in that case, our %s() function will be called moments later.)" msgstr "" #: ../doc-src/tp_magic_example_c.php:655 #, php-format msgid "" "It also happens when a Magic tool's mode changes (we will then receive a " "call to '%s()', above, for the new mode)." msgstr ""