Getting Icelandic docs translated for real this time

This commit is contained in:
Bill Kendrick 2023-06-29 16:34:00 -07:00
parent 580572892f
commit 9ca2bcb8e5
27 changed files with 282 additions and 282 deletions

View file

@ -1,16 +1,15 @@
Tux Paint
útgáfa 0.9.31 Advanced Stamps 'How-To'
version 0.9.31 Advanced Stamps 'How-To'
Höfundarréttur © 2006-2022 eftir Albert Cahalan and others; sjá
AUTHORS-skrá.
Copyright © 2006-2022 by Albert Cahalan and others; see AUTHORS.txt.
https://tuxpaint.org/
4. júní 2022
júní 4, 2022
----------------------------------------------------------------------
+----------------------------------------+
|Efnisyfirlit |
|Table of Contents |
|----------------------------------------|
| * About this 'How-To' |
| * Image choice is crucial |
@ -208,7 +207,7 @@ Replace the fringe and junk pixels
editing and viewing the WIP image. Frequent layer visibility changes
will help you to see what you are doing. You are likely to use all of:
* composited over grænt (mask enabled)
* composited over green (mask enabled)
* composited over magenta (mask enabled)
* original (the top or bottom layer)
* composited over the original (mask enabled)

View file

@ -1,11 +1,11 @@
Tux Paint
útgáfa 0.9.31
version 0.9.31
Environment Variables Documentation
Höfundarréttur © 2021-2023 eftir various contributors; sjá AUTHORS-skrá.
Copyright © 2021-2023 by various contributors; see AUTHORS.txt.
https://tuxpaint.org/
5. maí 2023
maí 5, 2023
----------------------------------------------------------------------

View file

@ -1,14 +1,14 @@
Extending
Tux Paint
útgáfa 0.9.31
version 0.9.31
Höfundarréttur © 2002-2023 eftir various contributors; sjá AUTHORS-skrá.
Copyright © 2002-2023 by various contributors; see AUTHORS.txt.
https://tuxpaint.org/
29. maí 2023
maí 29, 2023
+------------------------------------------+
|Efnisyfirlit |
|Table of Contents |
|------------------------------------------|
| * Where Files Go |
| * Standard Files |

View file

@ -1,15 +1,15 @@
Tux Paint
útgáfa 0.9.31 Frequently Asked Questions
version 0.9.31 Frequently Asked Questions
Höfundarréttur © 2002-2023 eftir various contributors; sjá AUTHORS-skrá.
Copyright © 2002-2023 by various contributors; see AUTHORS.txt.
https://tuxpaint.org/
16. mars 2023
mars 16, 2023
----------------------------------------------------------------------
+------------------------------+
|Efnisyfirlit |
|Table of Contents |
|------------------------------|
| * Drawing-related |
| * Interface Problems |

View file

@ -1,14 +1,14 @@
Tux Paint
útgáfa 0.9.31
version 0.9.31
Installation Documentation
Höfundarréttur © 2002-2023 eftir various contributors; sjá AUTHORS-skrá.
Copyright © 2002-2023 by various contributors; see AUTHORS.txt.
https://tuxpaint.org/
13. maí 2023
maí 13, 2023
+----------------------------------------------------+
|Efnisyfirlit |
|Table of Contents |
|----------------------------------------------------|
| * Requirements |
| * Simple DirectMedia Layer library (libSDL) |
@ -143,7 +143,7 @@ Simple DirectMedia Layer library (libSDL)
Windows
10. júlí 2022 Shin-ichi TOYAMA <dolphin6k@wmail.plala.or.jp>
júlí 10, 2022 Shin-ichi TOYAMA <dolphin6k@wmail.plala.or.jp>
Compiling Set-Up
@ -582,7 +582,7 @@ Linux/Unix
macOS
5. júní 2022 Mark Kim <markuskimius@gmail.com>
júní 5, 2022 Mark Kim <markuskimius@gmail.com>
Starting with Tux Paint 0.9.23, Tux Paint for macOS is built as though it
were a Linux application.
@ -795,7 +795,7 @@ macOS
Android
29. mars 2023 Pere Pujal i Carabantes <perepujal@gmail.com> (Edited by
mars 29, 2023 Pere Pujal i Carabantes <perepujal@gmail.com> (Edited by
Bill Kendrick)
As of March 2023, the Android build of Tux Paint is maintained in a
@ -860,7 +860,7 @@ Android
Haiku
7. maí 2023 Luc Schrijvers <begasus@gmail.com> (Edited by Bill Kendrick)
maí 7, 2023 Luc Schrijvers <begasus@gmail.com> (Edited by Bill Kendrick)
Prerequisites

View file

@ -1,17 +1,17 @@
Tux Paint
version 0.9.31
útgáfa 0.9.31
Magic Tool Plugin API Documentation
Copyright © 2007-2023 by various contributors; see AUTHORS.txt.
Höfundarréttur © 2007-2023 eftir various contributors; sjá AUTHORS-skrá.
https://tuxpaint.org/
apríl 13, 2023
13. apríl 2023
+----------------------------------------------------+
|Table of Contents |
|Efnisyfirlit |
|----------------------------------------------------|
| * Prequisites |
| * Forkröfur |
| * Interfaces |
| * 'Magic' tool plugin functions |
| * Common arguments to plugin functions |
@ -21,7 +21,7 @@ Magic Tool Plugin API Documentation
| * Tux Paint Functions and Data |
| * Pixel Manipulations |
| * Helper Functions |
| * Informational |
| * Til upplýsingar |
| * Tux Paint System Calls |
| * Color Conversions |
| * Helper Macros in "tp_magic_api.h" |
@ -36,11 +36,11 @@ Magic Tool Plugin API Documentation
| * macOS |
| * Creating plugins with multiple effects |
| * Example Code |
| * Getting Help |
| * Glossary |
| * Til að fá hjálp |
| * Orðasafn |
+----------------------------------------------------+
Overview
Yfirlit
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
@ -579,7 +579,7 @@ Tux Paint Functions and Data
to use this function. The "Blur" and "Smudge" tools that ship with
Tux Paint are examples of such effects.
Informational
Til upplýsingar
char * tp_version
A string containing the version of Tux Paint that's running (e.g.,
@ -1028,7 +1028,7 @@ macOS
The C source file "tp_magic_example.c" contains a complete example of a
plugin with multiple simple effects.
Getting Help
Til að fá hjálp
For more information, check the Tux Paint website: https://tuxpaint.org/,
and the Simple DirectMedia Layer library website: http://www.libsdl.org/.
@ -1037,57 +1037,57 @@ macOS
"tuxpaint-devel" and "tuxpaint-users" mailing lists:
https://tuxpaint.org/lists/.
Glossary
Orðasafn
* alpha: See "RGBA"
* &: See "ampersand"
* ampersand (pointers): "&". A symbol in C that allows you to refer to
* alfa: See "RGBA"
* &: See "'og' merki"
* 'og' merki (bendlar): "&". 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"'.) See
also: "star"
* ampersand (bitwise operator): "&". A symbol in C that acts as a
* 'og' merki (bitwise operator): "&". 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'). See
also: "bit"
also: "bitar"
* API: Application Programming Interface. TBD
* argument: A value sent to a function.
* viðfang: A value sent to a function.
* arrow: "->". A symbol in C that references an element within a pointer
to a struct.
* backquote: See "grave"
* backtick: See "grave"
* bit: "Binary digit." Bits are the basic storage unit in a computer's
* bakslag: See "grave"
* bitar: "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. See also: "byte"
* blue: See "RGBA"
* boolean 'or': 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".)
* |: See "boolean 'or'"
* .: See "dot"
fours place, eights place, etc. See also: "bæti"
* blátt: See "RGBA"
* boole gildið 'eða': 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".)
* |: See "boole gildið 'eða'"
* .: See "punktur"
* `: See "grave"
* *: See "star"
* byte: A unit of memory made up of 8 bits. As a signed value, it can
* bæti: 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.
* callback: TBD
* svörun: TBD
* C enumeration: 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 };"
* C function: TBD
* C function prototype: TBD
* C header file: TBD
* channel: TBD
* click: The action of pressing a button on a mouse.
* coordinates: A set of numbers corresponding to a physical position;
for example, in a two-dimensional (2D) image, "X" and "Y" coordinates
* rás: TBD
* smellur: The action of pressing a button on a mouse.
* hnit: 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.
@ -1105,17 +1105,18 @@ macOS
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.
* dimensions: The size of an object, in terms of its width (left to
right) and height (top to bottom).
* stærðir: The size of an object, in terms of its width (left to right)
and height (top to bottom).
* .dll: See "Shared Object"
* dot: ".". A symbol in C that references an element within a struct.
* drag: The action of moving a mouse while the button remains held.
* punktur: ".". A symbol in C that references an element within a
struct.
* draga: The action of moving a mouse while the button remains held.
* element: A variable stored within a C structure. (Example: "w" and "h"
elements of SDL_Surface store the surface's width and height,
respectively.)
* enum: See "C enumeration"
* float: See "floating point"
* floating point: TBD
* float: See "fleytitala"
* fleytitala: TBD
* format: 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). See also the
@ -1129,13 +1130,13 @@ macOS
* GNU C Compiler: See "gcc"
* grave: The "`" character; used by the BASH shell to use the output of
a command as the command-line arguments to another.
* green: See "RGBA"
* grænt: See "RGBA"
* ->: See "arrow"
* .h: See "C header file"
* header: See "C header file"
* haus: See "C header file"
* header file: See "C header file"
* HSV: Hue, Saturation and Value. TBD
* hue: See "HSV"
* litblær: See "HSV"
* IMG_Load(): An SDL_image function that loads an image file (e.g., a
PNG) and returns it as an "SDL_Surface *".
* #include: A C statement that asks the compiler to read the contents of
@ -1143,12 +1144,12 @@ macOS
* int: See "integer"
* integer: TBD
* libSDL: See "Simple DirectMedia Layer"
* linear: TBD
* macro: 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;".
* línulegt: TBD
* fjölvi: 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;".
* magic_api: A C structure that is passed along to a plugin's functions
that exposes data and functions within the running copy of Tux Paint.
* make: A utility that automatically determines which pieces of a larger
@ -1169,7 +1170,7 @@ macOS
* namespace: TBD
* .ogg: See "Ogg Vorbis"
* Ogg Vorbis: See also: "WAV"
* Plugin: TBD
* Viðbót: TBD
* .png: 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
@ -1177,9 +1178,9 @@ macOS
with full 8bpp alpha transparency), excellent for use in graphics
programs like Tux Paint. See also the "png(5)" man page)
* pointer: See "C pointer"
* prototype: See "C function prototype"
* red: See "RGBA"
* release: The action of releasing a button on a mouse.
* frumgerð: See "C function prototype"
* rautt: See "RGBA"
* sleppa: The action of releasing a button on a mouse.
* RGBA: "Red, Green, Blue, Alpha." TBD
* RGB: See "RGBA"
* saturation: See "HSV"
@ -1233,7 +1234,7 @@ macOS
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.) See also: "ampersand"
integer that's being pointed to.) See also: "'og' merki"
* strdup(): 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. See also the "strdup(3)" man page)
@ -1251,7 +1252,7 @@ macOS
representing a pixel's color; i.e., RBGA value).
* Uint8: An 8-bit, unsigned integer (defined by libSDL). In other words,
a byte that can represent 0 through 255.
* unsigned: In C, a variable that can store a numeric value can be
* óundirritað: 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
@ -1261,7 +1262,7 @@ macOS
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).
* value: See "HSV"
* gildi: See "HSV"
* variable: 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
@ -1269,5 +1270,5 @@ macOS
examined later: "if (a >= 18) { /* they are an adult */ } else { /*
they are not an adult */ }".
* .wav: See also: "Ogg Vorbis"
* (w,h): See "Dimensions"
* (x,y): See "Coordinates"
* (w,h): See "Stærðir"
* (x,y): See "Hnit"

View file

@ -1,15 +1,15 @@
Tux Paint
útgáfa 0.9.31
version 0.9.31
Options Documentation
Höfundarréttur © 2002-2023 eftir various contributors; sjá AUTHORS-skrá.
Copyright © 2002-2023 by various contributors; see AUTHORS.txt.
https://tuxpaint.org/
29. maí 2023
maí 29, 2023
+---------------------------------------------+
|Efnisyfirlit |
|Table of Contents |
|---------------------------------------------|
| * Tux Paint Config. |
| * Configuration File |

View file

@ -1,11 +1,11 @@
Tux Paint
útgáfa 0.9.31
version 0.9.31
PNG Documentation
Höfundarréttur © 2007-2022 eftir various contributors; sjá AUTHORS-skrá.
Copyright © 2007-2022 by various contributors; see AUTHORS.txt.
https://tuxpaint.org/
4. júní 2022
júní 4, 2022
About PNGs

View file

@ -1,15 +1,15 @@
Tux Paint
útgáfa 0.9.31
version 0.9.31
A simple drawing program for children
Höfundarréttur © 2002-2023 eftir various contributors; sjá AUTHORS-skrá.
Copyright © 2002-2023 by various contributors; see AUTHORS.txt.
https://tuxpaint.org/
29. maí 2023
maí 29, 2023
+----------------------------------------------------+
|Efnisyfirlit |
|Table of Contents |
|----------------------------------------------------|
| * About Tux Paint |
| * Using Tux Paint |
@ -844,7 +844,7 @@ Available Tools
Click this button and your picture will be printed!
On most platforms, you can also hold the [Alt] key (called
[Slaufa] on Macs) while clicking the 'Print' button to get a
[Option] on Macs) while clicking the 'Print' button to get a
printer dialog. Note that this may not work if you're running Tux
Paint in fullscreen mode. See below.
@ -904,7 +904,7 @@ Available Tools
printer with default settings when the 'Print' button
is pushed.
However, if you hold the [Alt] (or [Slaufa]) key on
However, if you hold the [Alt] (or [Option]) key on
the keyboard while clicking the 'Print' button, as
long as you're not in fullscreen mode, your operating
system's printer dialog will appear, where you can
@ -926,14 +926,14 @@ Available Tools
By default, Tux Paint only shows the printer dialog
(or, on Linux/Unix, runs the "altprintcommand"; e.g.,
"kprinter" instead of "lpr") if the [Alt] (or
[Slaufa]) key is held while clicking the 'Print'
[Option]) key is held while clicking the 'Print'
button.
However, this behavior can be changed. You can have
the printer dialog always appear by using
"--altprintalways" on the command-line, or
"altprint=always" in Tux Paint's configuration file.
Conversely, you can prevent the [Alt]/[Slaufa] key
Conversely, you can prevent the [Alt]/[Option] key
from having any effect by using "--altprintnever", or
"altprint=never".

View file

@ -1,11 +1,11 @@
Tux Paint
útgáfa 0.9.31
version 0.9.31
Signals Documentation
Höfundarréttur © 2019-2022 eftir various contributors; sjá AUTHORS-skrá.
Copyright © 2019-2022 by various contributors; see AUTHORS.txt.
https://tuxpaint.org/
4. júní 2022
júní 4, 2022
Tux Paint responds to the following signals (which can be sent to the
program's process via `kill` or `killall`, for example).

View file

@ -1,11 +1,11 @@
Tux Paint
útgáfa 0.9.31
version 0.9.31
SVG Documentation
Höfundarréttur © 2007-2022 eftir various contributors; sjá AUTHORS-skrá.
Copyright © 2007-2022 by various contributors; see AUTHORS.txt.
https://tuxpaint.org/
4. júní 2022
júní 4, 2022
About SVGs

View file

@ -17,15 +17,15 @@
width="205"
height="210"
alt="Tux Paint"><br>
útgáfa 0.9.31 Advanced Stamps 'How-To' </h1>
version 0.9.31 Advanced Stamps 'How-To' </h1>
<p>
Höfundarréttur &copy; 2006-2022 eftir Albert Cahalan and others; sjá <a href="../../AUTHORS.txt">AUTHORS-skrá</a>.<br>
Copyright &copy; 2006-2022 by Albert Cahalan and others; see <a href="../../AUTHORS.txt">AUTHORS.txt</a>.<br>
<a href="https://tuxpaint.org/">https://tuxpaint.org/</a>
</p>
<p>
4. júní 2022 </p>
júní 4, 2022 </p>
</center>
<hr size="2"
@ -34,10 +34,10 @@
<table border="2"
cellspacing="0"
cellpadding="2"
summary="Efnisyfirlit">
summary="Table of Contents">
<tr>
<th>
Efnisyfirlit </th>
Table of Contents </th>
</tr>
<tr>
@ -232,7 +232,7 @@
Now you will paint away the existing edge fringe. Be sure that you are editing and viewing the WIP image. Frequent layer visibility changes will help you to see what you are doing. You are likely to use all of: </p>
<ul>
<li>composited over grænt (mask enabled)</li>
<li>composited over green (mask enabled)</li>
<li>composited over magenta (mask enabled)</li>
<li>original (the top or bottom layer)</li>
<li>composited over the original (mask enabled)</li>

View file

@ -17,16 +17,16 @@
width="205"
height="210"
alt="Tux Paint"><br>
útgáfa 0.9.31<br/>
version 0.9.31<br/>
Environment Variables Documentation </h1>
<p>
Höfundarréttur &copy; 2021-2023 eftir various contributors; sjá <a href="../../AUTHORS.txt">AUTHORS-skrá</a>.<br>
Copyright &copy; 2021-2023 by various contributors; see <a href="../../AUTHORS.txt">AUTHORS.txt</a>.<br>
<a href="https://tuxpaint.org/">https://tuxpaint.org/</a>
</p>
<p>
5. maí 2023 </p>
maí 5, 2023 </p>
</center>
<hr>

View file

@ -92,27 +92,27 @@
width="205"
height="210"
alt="Tux Paint"><br>
útgáfa 0.9.31 </h1>
version 0.9.31 </h1>
<p>
Höfundarréttur &copy; 2002-2023 eftir various contributors; sjá <a href="../../AUTHORS.txt">AUTHORS-skrá</a>.<br>
Copyright &copy; 2002-2023 by various contributors; see <a href="../../AUTHORS.txt">AUTHORS.txt</a>.<br>
<a href="https://tuxpaint.org/">https://tuxpaint.org/</a>
</p>
<p>
29. maí 2023 </p>
maí 29, 2023 </p>
</center>
</header>
<table border="2"
cellspacing="0"
cellpadding="2"
summary="Efnisyfirlit"
summary="Table of Contents"
align="center"
style="page-break-inside: avoid;">
<tr>
<th>
Efnisyfirlit </th>
Table of Contents </th>
</tr>
<tr>
<td>

View file

@ -17,15 +17,15 @@
width="205"
height="210"
alt="Tux Paint"><br>
útgáfa 0.9.31 Frequently Asked Questions </h1>
version 0.9.31 Frequently Asked Questions </h1>
<p>
Höfundarréttur &copy; 2002-2023 eftir various contributors; sjá <a href="../../AUTHORS.txt">AUTHORS-skrá</a>.<br>
Copyright &copy; 2002-2023 by various contributors; see <a href="../../AUTHORS.txt">AUTHORS.txt</a>.<br>
<a href="https://tuxpaint.org/">https://tuxpaint.org/</a>
</p>
<p>
16. mars 2023 </p>
mars 16, 2023 </p>
</center>
<hr size="2"
@ -34,10 +34,10 @@
<table border="2"
cellspacing="0"
cellpadding="2"
summary="Efnisyfirlit">
summary="Table of Contents">
<tr>
<th>
Efnisyfirlit </th>
Table of Contents </th>
</tr>
<tr>

View file

@ -89,28 +89,28 @@
width="205"
height="210"
alt="Tux Paint"><br>
útgáfa 0.9.31<br/>
version 0.9.31<br/>
Installation Documentation </h1>
<p>
Höfundarréttur &copy; 2002-2023 eftir various contributors; sjá <a href="../../AUTHORS.txt">AUTHORS-skrá</a>.<br>
Copyright &copy; 2002-2023 by various contributors; see <a href="../../AUTHORS.txt">AUTHORS.txt</a>.<br>
<a href="https://tuxpaint.org/">https://tuxpaint.org/</a>
</p>
<p>
13. maí 2023 </p>
maí 13, 2023 </p>
</center>
</header>
<table border="2"
cellspacing="0"
cellpadding="2"
summary="Efnisyfirlit"
summary="Table of Contents"
align="center"
style="page-break-inside: avoid;">
<tr>
<th>
Efnisyfirlit </th>
Table of Contents </th>
</tr>
<tr>
@ -300,7 +300,7 @@
<p style="font-size: small;">
<em>
10. júlí 2022 Shin-ichi TOYAMA &lt;<a href="mailto:dolphin6k@wmail.plala.or.jp">dolphin6k@wmail.plala.or.jp</a>&gt;
júlí 10, 2022 Shin-ichi TOYAMA &lt;<a href="mailto:dolphin6k@wmail.plala.or.jp">dolphin6k@wmail.plala.or.jp</a>&gt;
</em>
</p>
</header>
@ -944,7 +944,7 @@
</h2>
<p style="font-size: small;">
<em>
5. júní 2022 Mark Kim &lt;<a href="mailto:markuskimius@gmail.com">markuskimius@gmail.com</a>&gt;
júní 5, 2022 Mark Kim &lt;<a href="mailto:markuskimius@gmail.com">markuskimius@gmail.com</a>&gt;
</em>
</p>
</header>
@ -1178,7 +1178,7 @@
</h2>
<p style="font-size: small;">
<em>
29. mars 2023 Pere Pujal i Carabantes &lt;<a href="mailto:perepujal@gmail.com">perepujal@gmail.com</a>&gt;
mars 29, 2023 Pere Pujal i Carabantes &lt;<a href="mailto:perepujal@gmail.com">perepujal@gmail.com</a>&gt;
(Edited by Bill Kendrick)
</em>
</p>
@ -1245,7 +1245,7 @@
</h2>
<p style="font-size: small;">
<em>
7. maí 2023 Luc Schrijvers &lt;<a href="mailto:begasus@gmail.com">begasus@gmail.com</a>&gt;
maí 7, 2023 Luc Schrijvers &lt;<a href="mailto:begasus@gmail.com">begasus@gmail.com</a>&gt;
(Edited by Bill Kendrick)
</em>
</p>

View file

@ -91,36 +91,36 @@
width="205"
height="210"
alt="Tux Paint"><br>
version 0.9.31 </h1>
útgáfa 0.9.31 </h1>
<h2>
Magic Tool Plugin API Documentation </h2>
<p>
Copyright &copy; 2007-2023 by various contributors; see <a href="../../AUTHORS.txt">AUTHORS.txt</a>.<br>
Höfundarréttur &copy; 2007-2023 eftir various contributors; sjá <a href="../../AUTHORS.txt">AUTHORS-skrá</a>.<br>
<a href="https://tuxpaint.org/">https://tuxpaint.org/</a>
</p>
<p>
apríl 13, 2023 </p>
13. apríl 2023 </p>
</center>
</header>
<table border="2"
cellspacing="0"
cellpadding="2"
summary="Table of Contents"
summary="Efnisyfirlit"
align="center"
style="page-break-inside: avoid;">
<tr>
<th>
Table of Contents </th>
Efnisyfirlit </th>
</tr>
<tr>
<td>
<ul>
<li><a href="#prereqs">Prequisites</a></li> <li><a href="#interfaces">Interfaces</a> <ul>
<li><a href="#prereqs">Forkröfur</a></li> <li><a href="#interfaces">Interfaces</a> <ul>
<li><a href="#magic_plugin_funcs">'Magic' tool plugin functions</a> <ul>
<li><a href="#common_args">Common arguments to plugin functions</a></li> <li><a href="#toolfuncs">Required Plugin Functions</a> <ul>
<li><a href="#housekeeping">Plugin "housekeeping" functions</a></li> <li><a href="#eventfuncs">Plugin event functions</a></li> </ul>
@ -128,7 +128,7 @@
</ul>
</li>
<li><a href="#tpfuncs">Tux Paint Functions and Data</a> <ul>
<li><a href="#pixel_manip">Pixel Manipulations</a></li> <li><a href="#helper_funcs">Helper Functions</a></li> <li><a href="#informational">Informational</a></li> <li><a href="#syscalls">Tux Paint System Calls</a></li> <li><a href="#color_convs">Color Conversions</a></li> </ul>
<li><a href="#pixel_manip">Pixel Manipulations</a></li> <li><a href="#helper_funcs">Helper Functions</a></li> <li><a href="#informational">Til upplýsingar</a></li> <li><a href="#syscalls">Tux Paint System Calls</a></li> <li><a href="#color_convs">Color Conversions</a></li> </ul>
</li>
<li><a href="#macros">Helper Macros in "tp_magic_api.h"</a></li> <li><a href="#consts">Constant Definitions in "tp_magic_api.h"</a></li> </ul>
</li>
@ -138,7 +138,7 @@
<li><a href="#installing">Installing</a> <ul>
<li><a href="#installing-linux">Linux and other Unix-like Platforms</a></li> <li><a href="#installing-windows">Windows</a></li> <li><a href="#installing-macos">macOS</a></li> </ul>
</li>
<li><a href="#multiple">Creating plugins with multiple effects</a></li> <li><a href="#examples">Example Code</a></li> <li><a href="#help">Getting Help</a></li> <li><a href="#glossary">Glossary</a></li> </ul>
<li><a href="#multiple">Creating plugins with multiple effects</a></li> <li><a href="#examples">Example Code</a></li> <li><a href="#help">Til að fá hjálp</a></li> <li><a href="#glossary">Orðasafn</a></li> </ul>
</td>
</tr>
</table>
@ -149,7 +149,7 @@
<div class="keeptogether">
<header>
<h1 id="overview">
Overview </h1>
Yfirlit </h1>
</header>
<p>
@ -593,7 +593,7 @@
<section class="indent"><!-- H3: Informational -->
<header>
<h3 id="informational">
Informational </h3>
Til upplýsingar </h3>
</header>
<dl>
@ -1122,7 +1122,7 @@
<section class="outer"><!-- H1: Getting Help -->
<header>
<h1 id="help">
Getting Help </h1>
Til að fá hjálp </h1>
</header>
<p>
@ -1136,28 +1136,28 @@
<section class="outer"><!-- H1: Glossary -->
<header>
<h1 id="glossary">
Glossary </h1>
Orðasafn </h1>
</header>
<ul>
<li>
<b>alpha:</b>
<b>alfa:</b>
See "RGBA" </li>
<li>
<b><code>&amp;</code>:</b>
See "ampersand" </li>
See "'og' merki" </li>
<li>
<b>ampersand (pointers):</b>
<b>'og' merki (bendlar):</b>
"<code>&amp;</code>". A symbol in C that allows you to refer to the memory address of a variable; that is, a pointer. (For example, consider "<code>int i;</code>". Later, "<code>&amp;i</code>" refers to the memory where "<code>i</code>" is stored, not the value of "<code>i</code>" itself; it is a 'pointer to "<code>i</code>"'.) See also: "star" </li>
<li>
<b>ampersand (bitwise operator):</b>
"<code>&amp;</code>". A symbol in C that acts as a bitwise "and" operator. Only bits set in both values will be returned. For example, "<code>11 &amp; 6</code>" compares the binary values '1011' to '0110'. Only the bit in the 2's place is set, so the result is <code>2</code> ('0010'). See also: "bit" </li>
<b>'og' merki (bitwise operator):</b>
"<code>&amp;</code>". A symbol in C that acts as a bitwise "and" operator. Only bits set in both values will be returned. For example, "<code>11 &amp; 6</code>" compares the binary values '1011' to '0110'. Only the bit in the 2's place is set, so the result is <code>2</code> ('0010'). See also: "bitar" </li>
<li>
<b>API:</b>
Application Programming Interface. <i>TBD</i>
</li>
<li>
<b>argument:</b>
<b>viðfang:</b>
A value sent to a function. </li>
<li>
<b>arrow:</b>
@ -1166,23 +1166,23 @@
<b>backquote:</b>
See "grave" </li>
<li>
<b>backtick:</b>
<b>bakslag:</b>
See "grave" </li>
<li>
<b>bit:</b>
"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. See also: "byte" </li>
<b>bitar:</b>
"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. See also: "bæti" </li>
<li>
<b>blue:</b>
<b>blátt:</b>
See "RGBA" </li>
<li>
<b>boolean 'or':</b>
<b>boole gildið 'eða':</b>
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".) </li>
<li>
<b><code>|</code>:</b>
See "boolean 'or'" </li>
See "boole gildið 'eða'" </li>
<li>
<b><code>.</code>:</b>
See "dot" </li>
See "punktur" </li>
<li>
<b><code>`</code>:</b>
See "grave" </li>
@ -1190,10 +1190,10 @@
<b><code>*</code>:</b>
See "star" </li>
<li>
<b>byte:</b>
<b>bæti:</b>
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. </li>
<li>
<b>callback:</b>
<b>svörun:</b>
<i>TBD</i>
</li>
<li>
@ -1212,14 +1212,14 @@
<i>TBD</i>
</li>
<li>
<b>channel:</b>
<b>rás:</b>
<i>TBD</i>
</li>
<li>
<b>click:</b>
<b>smellur:</b>
The action of pressing a button on a mouse. </li>
<li>
<b>coordinates:</b>
<b>hnit:</b>
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. </li>
<li>
<b>C pointer:</b>
@ -1231,16 +1231,16 @@
<b><code>#define</code>:</b>
A C statement that defines a substitution that can occur later in the code. Generally used for constant values (e.g., "<code>#define RADIUS 16</code>"; all instances of "<code>RADIUS</code>" will be replaced with "<code>16</code>"), but can also be used to create macros. Typically placed within C header files. </li>
<li>
<b>dimensions:</b>
<b>stærðir:</b>
The size of an object, in terms of its width (left to right) and height (top to bottom). </li>
<li>
<b><code>.dll</code>:</b>
See "Shared Object" </li>
<li>
<b>dot:</b>
<b>punktur:</b>
"<code>.</code>". A symbol in C that references an element within a struct. </li>
<li>
<b>drag:</b>
<b>draga:</b>
The action of moving a mouse while the button remains held. </li>
<li>
<b>element:</b>
@ -1250,9 +1250,9 @@
See "C enumeration" </li>
<li>
<b><code>float</code>:</b>
See "floating point" </li>
See "fleytitala" </li>
<li>
<b>floating point:</b>
<b>fleytitala:</b>
<i>TBD</i>
</li>
<li>
@ -1277,7 +1277,7 @@
<b>grave:</b>
The "<code><font size=+1>`</font></code>" character; used by the BASH shell to use the output of a command as the command-line arguments to another. </li>
<li>
<b>green:</b>
<b>grænt:</b>
See "RGBA" </li>
<li>
<b><code>-&gt;</code>:</b>
@ -1286,7 +1286,7 @@
<b><code>.h</code>:</b>
See "C header file" </li>
<li>
<b>header:</b>
<b>haus:</b>
See "C header file" </li>
<li>
<b>header file:</b>
@ -1296,7 +1296,7 @@
Hue, Saturation and Value. <i>TBD</i>
</li>
<li>
<b>hue:</b>
<b>litblær:</b>
See "HSV" </li>
<li>
<b><code>IMG_Load()</code>:</b>
@ -1315,11 +1315,11 @@
<b><code>libSDL</code>:</b>
See "Simple DirectMedia Layer" </li>
<li>
<b>linear:</b>
<b>línulegt:</b>
<i>TBD</i>
</li>
<li>
<b>macro:</b>
<b>fjölvi:</b>
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 "<code>#define ADD(A,B) ((A)+(B))</code>", and then used it with "<code>c = ADD(1,2);</code>", that line of code would literally expand to "<code>c = ((1) + (2));</code>", or more simply, "<code>c = 1 + 2;</code>". </li>
<li>
<b><code>magic_api</code>:</b>
@ -1353,7 +1353,7 @@
<b><cite>Ogg Vorbis</cite>:</b>
See also: "WAV" </li>
<li>
<b>Plugin:</b>
<b>Viðbót:</b>
<i>TBD</i>
</li>
<li>
@ -1363,13 +1363,13 @@
<b>pointer:</b>
See "C pointer" </li>
<li>
<b>prototype:</b>
<b>frumgerð:</b>
See "C function prototype" </li>
<li>
<b>red:</b>
<b>rautt:</b>
See "RGBA" </li>
<li>
<b>release:</b>
<b>sleppa:</b>
The action of releasing a button on a mouse. </li>
<li>
<b><code>RGBA</code>:</b>
@ -1423,7 +1423,7 @@
See "RGBA" </li>
<li>
<b>star:</b>
"<code>*</code>". 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, "<code>int * p;</code>" means that "<code>p</code>" is a <i>pointer</i> to an integer.) When used next to a pointer, it 'dereferences' the variable. (For example, later "<code>*p = 50;</code>" assigns the value of 50 to the memory that "<code>p</code>" points to; it does not change the value of "<code>p</code>", which is still a pointer to an integer. In essence, it changed the integer that's being pointed to.) See also: "ampersand" </li>
"<code>*</code>". 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, "<code>int * p;</code>" means that "<code>p</code>" is a <i>pointer</i> to an integer.) When used next to a pointer, it 'dereferences' the variable. (For example, later "<code>*p = 50;</code>" assigns the value of 50 to the memory that "<code>p</code>" points to; it does not change the value of "<code>p</code>", which is still a pointer to an integer. In essence, it changed the integer that's being pointed to.) See also: "'og' merki" </li>
<li>
<b><code>strdup()</code>:</b>
A C function that allocates enough memory to store a copy of a string, copies the string to it, and returns a "<code>char *</code>" pointer to the new copy. See also the "<code>strdup(3)</code>" <i>man page</i>) </li>
@ -1443,10 +1443,10 @@
<b><code>Uint8</code>:</b>
An 8-bit, unsigned integer (defined by libSDL). In other words, a byte that can represent 0 through 255. </li>
<li>
<b>unsigned:</b>
<b>óundirritað:</b>
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). </li>
<li>
<b>value:</b>
<b>gildi:</b>
See "HSV" </li>
<li>
<b>variable:</b>
@ -1456,10 +1456,10 @@
See also: "Ogg Vorbis" </li>
<li>
<b><code>(w,h)</code>:</b>
See "Dimensions" </li>
See "Stærðir" </li>
<li>
<b><code>(x,y)</code>:</b>
See "Coordinates" </li>
See "Hnit" </li>
</ul>
</section><!-- H1: Glossary -->

View file

@ -91,30 +91,30 @@
width="205"
height="210"
alt="Tux Paint"><br>
útgáfa 0.9.31 </h1>
version 0.9.31 </h1>
<h2>
Options Documentation </h2>
<p>
Höfundarréttur &copy; 2002-2023 eftir various contributors; sjá <a href="../../AUTHORS.txt">AUTHORS-skrá</a>.<br>
Copyright &copy; 2002-2023 by various contributors; see <a href="../../AUTHORS.txt">AUTHORS.txt</a>.<br>
<a href="https://tuxpaint.org/">https://tuxpaint.org/</a>
</p>
<p>
29. maí 2023 </p>
maí 29, 2023 </p>
</center>
</header>
<table border="2"
cellspacing="0"
cellpadding="2"
summary="Efnisyfirlit"
summary="Table of Contents"
align="center"
style="page-break-inside: avoid;">
<tr>
<th>
Efnisyfirlit </th>
Table of Contents </th>
</tr>
<tr>

View file

@ -89,16 +89,16 @@
width="205"
height="210"
alt="Tux Paint"><br>
útgáfa 0.9.31<br/>
version 0.9.31<br/>
PNG Documentation </h1>
<p>
Höfundarréttur &copy; 2007-2022 eftir various contributors; sjá <a href="../../AUTHORS.txt">AUTHORS-skrá</a>.<br>
Copyright &copy; 2007-2022 by various contributors; see <a href="../../AUTHORS.txt">AUTHORS.txt</a>.<br>
<a href="https://tuxpaint.org/">https://tuxpaint.org/</a>
</p>
<p>
4. júní 2022 </p>
júní 4, 2022 </p>
</center>
</header>
</section>

View file

@ -91,29 +91,29 @@
width="205"
height="210"
alt="Tux Paint"><br>
útgáfa 0.9.31 </h1>
version 0.9.31 </h1>
<h3 align="center">
A simple drawing program for children </h3>
<p>
Höfundarréttur &copy; 2002-2023 eftir various contributors; sjá <a href="../../AUTHORS.txt">AUTHORS-skrá</a>.<br/>
Copyright &copy; 2002-2023 by various contributors; see <a href="../../AUTHORS.txt">AUTHORS.txt</a>.<br/>
<a href="https://tuxpaint.org/">https://tuxpaint.org/</a>
</p>
<p>
29. maí 2023 </p>
maí 29, 2023 </p>
</center>
</header>
<table border="2"
cellspacing="0"
cellpadding="2"
summary="Efnisyfirlit"
summary="Table of Contents"
align="center"
style="page-break-inside: avoid;">
<tr>
<th>
Efnisyfirlit </th>
Table of Contents </th>
</tr>
<tr>
@ -1265,7 +1265,7 @@
Click this button and your picture will be printed! </p>
<p>
On most platforms, you can also hold the <b><code>[Alt]</code></b> key (called <b><code>[Slaufa]</code></b> on Macs) while clicking the 'Print' button to get a printer dialog. Note that this may not work if you're running Tux Paint in fullscreen mode. See below. </p>
On most platforms, you can also hold the <b><code>[Alt]</code></b> key (called <b><code>[Option]</code></b> on Macs) while clicking the 'Print' button to get a printer dialog. Note that this may not work if you're running Tux Paint in fullscreen mode. See below. </p>
<dl>
<dt>
@ -1341,7 +1341,7 @@
By default, Tux Paint simply prints to the default printer with default settings when the 'Print' button is pushed. </p>
<p>
However, if you hold the <b><code>[Alt]</code></b> (or <b><code>[Slaufa]</code></b>) key on the keyboard while clicking the 'Print' button, as long as you're not in fullscreen mode, your operating system's printer dialog will appear, where you can change the settings. </p>
However, if you hold the <b><code>[Alt]</code></b> (or <b><code>[Option]</code></b>) key on the keyboard while clicking the 'Print' button, as long as you're not in fullscreen mode, your operating system's printer dialog will appear, where you can change the settings. </p>
<p>
You can have the printer configuration changes stored between Tux Paint sessions by setting the "<code>printcfg</code>" option. </p>
@ -1359,10 +1359,10 @@
<dd>
<p>
By default, Tux Paint only shows the printer dialog (or, on Linux/Unix, runs the "<code>altprintcommand</code>"; e.g., "<code>kprinter</code>" instead of "<code>lpr</code>") if the <b><code>[Alt]</code></b> (or <b><code>[Slaufa]</code></b>) key is held while clicking the 'Print' button. </p>
By default, Tux Paint only shows the printer dialog (or, on Linux/Unix, runs the "<code>altprintcommand</code>"; e.g., "<code>kprinter</code>" instead of "<code>lpr</code>") if the <b><code>[Alt]</code></b> (or <b><code>[Option]</code></b>) key is held while clicking the 'Print' button. </p>
<p>
However, this behavior can be changed. You can have the printer dialog always appear by using "<code>--altprintalways</code>" on the command-line, or "<code>altprint=always</code>" in Tux Paint's configuration file. Conversely, you can prevent the <b><code>[Alt]</code></b>/<b><code>[Slaufa]</code></b> key from having any effect by using "<code>--altprintnever</code>", or "<code>altprint=never</code>". </p>
However, this behavior can be changed. You can have the printer dialog always appear by using "<code>--altprintalways</code>" on the command-line, or "<code>altprint=always</code>" in Tux Paint's configuration file. Conversely, you can prevent the <b><code>[Alt]</code></b>/<b><code>[Option]</code></b> key from having any effect by using "<code>--altprintnever</code>", or "<code>altprint=never</code>". </p>
<p class="note">
<span title="Configuration option">&#9881;</span> See the "<a href="OPTIONS.html"><em>Options</em></a>" documentation. </p>

View file

@ -89,16 +89,16 @@
width="205"
height="210"
alt="Tux Paint"><br>
útgáfa 0.9.31<br/>
version 0.9.31<br/>
Signals Documentation </h1>
<p>
Höfundarréttur &copy; 2019-2022 eftir various contributors; sjá <a href="../../AUTHORS.txt">AUTHORS-skrá</a>.<br>
Copyright &copy; 2019-2022 by various contributors; see <a href="../../AUTHORS.txt">AUTHORS.txt</a>.<br>
<a href="https://tuxpaint.org/">https://tuxpaint.org/</a>
</p>
<p>
4. júní 2022 </p>
júní 4, 2022 </p>
</header>
</center>
</section>

View file

@ -91,16 +91,16 @@
width="205"
height="210"
alt="Tux Paint"><br>
útgáfa 0.9.31<br/>
version 0.9.31<br/>
SVG Documentation </h1>
<p>
Höfundarréttur &copy; 2007-2022 eftir various contributors; sjá <a href="../../AUTHORS.txt">AUTHORS-skrá</a>.<br>
Copyright &copy; 2007-2022 by various contributors; see <a href="../../AUTHORS.txt">AUTHORS.txt</a>.<br>
<a href="https://tuxpaint.org/">https://tuxpaint.org/</a>
</p>
<p>
4. júní 2022 </p>
júní 4, 2022 </p>
</center>
</header>
</section>

View file

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

View file

@ -224,7 +224,7 @@
</ul>
<p>
<em>Last updated: 9. maí 2023</em>
<em>Last updated: maí 9, 2023</em>
</p>
</body>

View file

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

View file

@ -212,4 +212,4 @@ Shortcuts while drawing:
* [Alt]+[S] - Toggle sound effects on/off
* [Esc] - ⤺Back or 🗙Quit
Last updated: 9. maí 2023
Last updated: maí 9, 2023

View file

@ -1,5 +1,5 @@
.\" tuxpaint.1 - 2023.06.04
.TH TUXPAINT 1 " 4. júní 2023" "0.9.31" "Tux Paint"
.TH TUXPAINT 1 "júní 4, 2023" "0.9.31" "Tux Paint"
.SH NAME
tuxpaint -- "Tux Paint", a drawing program for young children.