tp-magic-config man moved to (1)
Magic tool documentation now split into separate files, and referenced (as a directory) from README, so that users can find docs to any additional tools (ones not included by default with Tux Paint) that are installed. Added new --datadir option, to separate path to brushes/stamps/etc. from that of saved files. Improved docs on where savedir default is. Made sure --help, man tuxpaint, and OPTIONS docs all covered all command-line options. Noted SDL_Pango makes locale-specific fonts unnecessary. Added "--plugindocprefix" option to tp-magic-config, for where docs should go. Improved plugin API documentation. Improved layout of man pages a little.
This commit is contained in:
parent
ace762e890
commit
adf56ef7e9
66 changed files with 1809 additions and 592 deletions
16
Makefile
16
Makefile
|
|
@ -7,7 +7,7 @@
|
|||
# bill@newbreedsoftware.com
|
||||
# http://www.tuxpaint.org/
|
||||
|
||||
# June 14, 2002 - July 31, 2007
|
||||
# June 14, 2002 - August 2, 2007
|
||||
|
||||
|
||||
# The version number, for release:
|
||||
|
|
@ -529,7 +529,7 @@ uninstall: uninstall-i18n
|
|||
-rm $(MAN_PREFIX)/man1/tuxpaint.1.gz
|
||||
-rm $(MAN_PREFIX)/pl/man1/tuxpaint.1.gz
|
||||
-rm $(MAN_PREFIX)/man1/tuxpaint-import.1.gz
|
||||
-rm $(MAN_PREFIX)/man3/tp-magic-config.3.gz
|
||||
-rm $(MAN_PREFIX)/man1/tp-magic-config.1.gz
|
||||
-rm -f -r $(CONFDIR)
|
||||
-rm -r $(MAGIC_PREFIX)
|
||||
-rm -r $(INCLUDE_PREFIX)/tuxpaint
|
||||
|
|
@ -743,6 +743,7 @@ install-doc:
|
|||
@echo "...Installing documentation..."
|
||||
@install -d $(DOC_PREFIX)
|
||||
@cp -R docs/* $(DOC_PREFIX)
|
||||
@cp -R magic/magic-docs $(DOC_PREFIX)
|
||||
@chmod a=rX,g=rX,u=rwX $(DOC_PREFIX)
|
||||
|
||||
|
||||
|
|
@ -753,8 +754,6 @@ install-man:
|
|||
@echo "...Installing man pages..."
|
||||
@# man1 directory...
|
||||
@install -d $(MAN_PREFIX)/man1
|
||||
@# man3 directory...
|
||||
@install -d $(MAN_PREFIX)/man3
|
||||
@# tuxpaint.1
|
||||
@cp src/manpage/tuxpaint.1 $(MAN_PREFIX)/man1
|
||||
@gzip -f $(MAN_PREFIX)/man1/tuxpaint.1
|
||||
|
|
@ -769,10 +768,10 @@ install-man:
|
|||
@cp src/manpage/tuxpaint-import.1 $(MAN_PREFIX)/man1/
|
||||
@gzip -f $(MAN_PREFIX)/man1/tuxpaint-import.1
|
||||
@chmod a+rx,g-w,o-w $(MAN_PREFIX)/man1/tuxpaint-import.1.gz
|
||||
@# tp-magic-config.3
|
||||
@cp src/manpage/tp-magic-config.3 $(MAN_PREFIX)/man3/
|
||||
@gzip -f $(MAN_PREFIX)/man3/tp-magic-config.3
|
||||
@chmod a+rx,g-w,o-w $(MAN_PREFIX)/man3/tp-magic-config.3.gz
|
||||
@# tp-magic-config.1
|
||||
@cp src/manpage/tp-magic-config.1 $(MAN_PREFIX)/man1/
|
||||
@gzip -f $(MAN_PREFIX)/man1/tp-magic-config.1
|
||||
@chmod a+rx,g-w,o-w $(MAN_PREFIX)/man1/tp-magic-config.1.gz
|
||||
|
||||
|
||||
|
||||
|
|
@ -940,6 +939,7 @@ tp-magic-config: src/tp-magic-config.sh.in Makefile
|
|||
-e s=__INCLUDE__=$(INCLUDE_PREFIX)/tuxpaint= \
|
||||
-e s=__DATAPREFIX__=$(DATA_PREFIX)= \
|
||||
-e s=__PLUGINPREFIX__=$(MAGIC_PREFIX)= \
|
||||
-e s=__PLUGINDOCPREFIX__=$(DOC_PREFIX)/magic-docs= \
|
||||
> tp-magic-config
|
||||
|
||||
# Make the "obj" directory to throw the object(s) into:
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ $Id$
|
|||
source-code by using new "tp-magic-config" shell script to query
|
||||
for C compiler flags (which points to where "tp_magic_api.h" header
|
||||
file is installed) and directories Tux Paint uses (where plugin '.so'
|
||||
files shoudl be stored, and where Tux Paint's global data files go).
|
||||
files should be stored, and where Tux Paint's global data files and
|
||||
documentation go).
|
||||
|
||||
* Magic plugin development docs created. On Linux/Unix, installed into
|
||||
/usr/[local/]share/docs/tuxpaint-dev/ by default. (HTML and plaintext.)
|
||||
|
|
@ -63,6 +64,11 @@ $Id$
|
|||
affected (until mouse button is released and clicked again).
|
||||
Improves performance, especially where heavy math is used.
|
||||
|
||||
* Magic tool documentation now split into separate files, and referenced
|
||||
(as a directory) from README, so that users can find docs to any
|
||||
additional tools (ones not included by default with Tux Paint) that are
|
||||
installed.
|
||||
|
||||
* Began adding support for using SDL_Pango, a wrapper to Pango,
|
||||
a library for layout and rendering of text, with an emphasis on
|
||||
internationalization. (The hope is to improve support for languages
|
||||
|
|
@ -80,6 +86,10 @@ $Id$
|
|||
* Print configuration is now saved between Tux Paint sessions on Mac OS X.
|
||||
Martin Fuhrer <mfuhrer@users.sourceforge.net>
|
||||
|
||||
* Saved-files directory and data directory (brushes, starters, etc.) can
|
||||
now be different. Use "--datadir" option to override default data
|
||||
directory, similar to "--savedir" has been for overriding save directory.
|
||||
|
||||
* New Brushes
|
||||
-----------
|
||||
* Sparkles (based on old Magic Tool)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
July 4, 2007
|
||||
August 2, 2007
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ Windows Users
|
|||
|
||||
printcfg=yes
|
||||
|
||||
(Windows only)
|
||||
(Windows and Mac OS X only)
|
||||
|
||||
Tux Paint will use a printer configuration file when printing.
|
||||
Push the [Alt] key while clicking the 'Print' button in
|
||||
|
|
@ -318,20 +318,72 @@ Windows Users
|
|||
|
||||
savedir=DIRECTORY
|
||||
|
||||
Use this option to change where Tux Paint saves pictures. By
|
||||
default, this is "~/.tuxpaint/saved/" under Linux and Unix, and
|
||||
"userdata\" under Windows.
|
||||
Use this option to change where Tux Paint's "saved"
|
||||
directory/folder is located, which is where Tux Paint saves and
|
||||
opens pictures.
|
||||
|
||||
This can be useful in a Windows lab, where Tux Paint is
|
||||
installed on a server, and children run it from workstations.
|
||||
You can set savedir to be a folder in their home directory.
|
||||
(e.g., "H:\tuxpaint\")
|
||||
If you do not override it, the default location is:
|
||||
|
||||
* Linux & Unix -- Under a hidden directory named ".tuxpaint"
|
||||
in your home directory (aka "~" or "$HOME")
|
||||
Example: "/home/username/.tuxpaint/saved/"
|
||||
|
||||
* Windows -- Inside a folder named "TuxPaint" in your
|
||||
"Application Data" folder.
|
||||
Example:
|
||||
"C:\Documents and Settings\Username\Application Data\TuxPaint\saved\"
|
||||
|
||||
* Mac OS X -- Inside a folder named "TuxPaint" in your
|
||||
"Application Support" folder.
|
||||
Example:
|
||||
"/Users/Username/Library/Application Support/TuxPaint/saved/"
|
||||
|
||||
Note: When specifying a Windows drive (e.g., "H:\"), you must
|
||||
also specify a subdirectory.
|
||||
|
||||
Note: Prior to version 0.9.18, Tux Paint would also use the
|
||||
setting or default for "savedir" as the place to search for
|
||||
personal data files (brushes, stamps, starters and fonts). As of
|
||||
version 0.9.18, they may be specified separately (see the
|
||||
"datadir" option, below).
|
||||
|
||||
Example: savedir=Z:\tuxpaint\
|
||||
|
||||
datadir=DIRECTORY
|
||||
|
||||
Use this option to change where Tux Paint looks for personal
|
||||
data files (brushes, stamps, starters and fonts specific to the
|
||||
current user).
|
||||
|
||||
Tux Paint will search for subdirectories/subfolders named
|
||||
"brushes", "stamps", "starters" and "fonts" under the data
|
||||
directory.
|
||||
|
||||
If you do not override it, the default location is:
|
||||
|
||||
* Linux & Unix -- Under a hidden directory named ".tuxpaint"
|
||||
in your home directory (aka "~" or "$HOME")
|
||||
Example: "/home/username/.tuxpaint/brushes/"
|
||||
|
||||
* Windows -- Inside a folder named "TuxPaint" in your
|
||||
"Application Data" folder.
|
||||
Example:
|
||||
"C:\Documents and Settings\Username\Application Data\TuxPaint\brushes\"
|
||||
|
||||
* Mac OS X -- Inside a folder named "TuxPaint" in your
|
||||
"Application Support" folder.
|
||||
Example:
|
||||
"/Users/Username/Library/Application Support/TuxPaint/brushes/"
|
||||
|
||||
Note: Prior to version 0.9.18, Tux Paint would use the same
|
||||
setting or default as for "savedir" to search for data files. As
|
||||
of version 0.9.18, they may be specified separately.
|
||||
|
||||
Note: When specifying a Windows drive (e.g., "H:\"), you must
|
||||
also specify a subdirectory.
|
||||
|
||||
Example: datadir=/home/johnny/tuxpaint-data/
|
||||
|
||||
saveover=yes
|
||||
This disables the "Save over the old version...?" prompt when
|
||||
saving an existing file. With this option, the older version
|
||||
|
|
@ -356,9 +408,8 @@ Windows Users
|
|||
test environment.
|
||||
|
||||
autosave=yes
|
||||
|
||||
This prevents Tux Paint from asking whether you want to save the current
|
||||
picture when quitting, and assumes you do.
|
||||
This prevents Tux Paint from asking whether you want to save the
|
||||
current picture when quitting, and assumes you do.
|
||||
|
||||
startblank=yes
|
||||
This causes Tux Paint to display a blank canvas when it first
|
||||
|
|
@ -583,6 +634,8 @@ Windows Users
|
|||
--noprint
|
||||
--printdelay=SECONDS
|
||||
--printcfg
|
||||
--altprintnever
|
||||
--altprintalways
|
||||
--papersize=PAPERSIZE
|
||||
--simpleshapes
|
||||
--uppercase
|
||||
|
|
@ -599,11 +652,13 @@ Windows Users
|
|||
--mirrorstamps
|
||||
--keyboard
|
||||
--savedir DIRECTORY
|
||||
--datadir DIRECTORY
|
||||
--saveover
|
||||
--saveovernew
|
||||
--nosave
|
||||
--autosave
|
||||
--lang LANGUAGE
|
||||
--colorfile FILE
|
||||
These enable or correspond to the configuration file options
|
||||
described above.
|
||||
|
||||
|
|
@ -618,6 +673,7 @@ Windows Users
|
|||
--print
|
||||
--printdelay=0
|
||||
--noprintcfg
|
||||
--altprintmod
|
||||
--complexshapes
|
||||
--mixedcase
|
||||
--dontgrab
|
||||
|
|
@ -641,7 +697,7 @@ Windows Users
|
|||
|
||||
-------------------------------------
|
||||
|
||||
--locale locale
|
||||
--locale LOCALE
|
||||
|
||||
Run Tux Paint in one of the support languages. See the
|
||||
"Choosing a Different Language" section below for the locale
|
||||
|
|
@ -971,6 +1027,12 @@ Setting Your Environment's Locale
|
|||
with the Tux Paint download, and are available separately. (See the
|
||||
table above, under the "Choosing a Different Language" section.)
|
||||
|
||||
Note: As of version 0.9.18, Tux Paint uses the "SDL_Pango" library,
|
||||
which utilizes the "Pango" library to render text in the user
|
||||
interface, rather than using "SDL_ttf" directly. Unless your copy of
|
||||
Tux Paint was built without Pango support, special fonts should no
|
||||
longer be necessary.
|
||||
|
||||
When running Tux Paint in a language that requires its own font,
|
||||
Tux Paint will try to load the font file from its system-wide "fonts"
|
||||
directory (under a "locale" subdirectory). The name of the file
|
||||
|
|
@ -990,3 +1052,5 @@ Setting Your Environment's Locale
|
|||
|
||||
Under Unix and Linux, you can use the Makefile that comes with the
|
||||
font to install the font in the appropriate location.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
|
|
|||
120
docs/README.txt
120
docs/README.txt
|
|
@ -9,7 +9,7 @@
|
|||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
June 14, 2002 - June 27, 2007
|
||||
June 14, 2002 - August 2, 2007
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -329,104 +329,13 @@ Available Tools
|
|||
|
||||
The 'Magic' tool is actually a set of special
|
||||
tools. Select one of the "magic" effects from
|
||||
the selector on the right, and then click and
|
||||
drag around the picture to apply the effect.
|
||||
the selector on the right. Then, depending on
|
||||
the tool, either click and drag around the
|
||||
picture, or simply click the picture once, to
|
||||
apply the effect.
|
||||
|
||||
Fill
|
||||
This floods the picture with a color.
|
||||
It lets you quickly fill parts of the
|
||||
picture, as if it were a coloring
|
||||
book.
|
||||
|
||||
Grass
|
||||
This paints grass on the image. The
|
||||
higher up the canvas, the smaller the
|
||||
grass is drawn, giving an illusion of
|
||||
perspective. The grass can be tinted
|
||||
various greenish hues by selecting
|
||||
different colors in the color
|
||||
palette.
|
||||
|
||||
Bricks (Large and Small)
|
||||
These two tools intelligently paint
|
||||
large and small brick patterns on the
|
||||
canvas. The bricks can be tinted
|
||||
various redish hues by selecting
|
||||
different colors in the color
|
||||
palette.
|
||||
|
||||
Rainbow
|
||||
This is similar to the paint brush,
|
||||
but as you move the mouse around, it
|
||||
cycles through a spectrum of bright
|
||||
colors.
|
||||
|
||||
Sparkles
|
||||
This draws glowing sparkles on the
|
||||
canvas, in the currently-selected
|
||||
color.
|
||||
|
||||
Blur
|
||||
This makes the picture fuzzy wherever
|
||||
you drag the mouse.
|
||||
|
||||
Smudge
|
||||
This pushes the colors around under
|
||||
the mouse, like finger painting with
|
||||
wet paint.
|
||||
|
||||
Lighten
|
||||
This fades the colors wherever you
|
||||
drag the mouse. (Do it to the same
|
||||
spot many times, and it will
|
||||
eventually become white.)
|
||||
|
||||
Darken
|
||||
This dakrens the colors wherever you
|
||||
drag the mouse. (Do it to the same
|
||||
spot many times, and it will
|
||||
eventually become black.)
|
||||
|
||||
Chalk
|
||||
This makes parts of the picture
|
||||
(where you move the mouse) look like
|
||||
a chalk drawing.
|
||||
|
||||
Blocks
|
||||
This makes the picture blocky looking
|
||||
("pixelated") wherever you drag the
|
||||
mouse.
|
||||
|
||||
Negative
|
||||
This inverts the colors wherever you
|
||||
drag the mouse. (e.g., white becomes
|
||||
black, and vice versa.)
|
||||
|
||||
Tint
|
||||
This changes the parts of the picture
|
||||
to the selected color.
|
||||
|
||||
Drip
|
||||
This makes the paint "drip" wherever
|
||||
you move the mouse.
|
||||
|
||||
Cartoon
|
||||
This makes the picture look like a
|
||||
cartoon -- with thick outlines and
|
||||
bright, solid colors -- wherever you
|
||||
move the mouse.
|
||||
|
||||
Mirror
|
||||
When you click the mouse in your
|
||||
picture with the "Mirror" magic
|
||||
effect selected, the entire image
|
||||
will be reversed, turning it into a
|
||||
mirror image.
|
||||
|
||||
Flip
|
||||
Similar to "Mirror." Click and the
|
||||
entire image will be turned
|
||||
upside-down.
|
||||
Each 'Magic' tool's instructions are contained
|
||||
within the "magic-docs" folder.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -902,15 +811,18 @@ Doing it Manually
|
|||
Other documentation included with Tux Paint (in the "docs"
|
||||
folder/directory) include:
|
||||
|
||||
* "Magic" Tool Documentation ("magic-docs")
|
||||
Documentation for each of the currently-installed
|
||||
"Magic" tools.
|
||||
* AUTHORS.txt
|
||||
List of authors and contributors
|
||||
List of authors and contributors.
|
||||
* CHANGES.txt
|
||||
Summary of changed between releases
|
||||
Summary of changed between releases.
|
||||
* COPYING.txt
|
||||
Copying license (The GNU General Public License)
|
||||
Copying license (The GNU General Public License).
|
||||
* INSTALL.txt
|
||||
Instructions for compiling/installing, when
|
||||
applicable
|
||||
applicable.
|
||||
* EXTENDING.html
|
||||
Detailed instructions on creating brushes, stamps and
|
||||
starters, and adding fonts, to extend Tux Paint.
|
||||
|
|
@ -920,10 +832,10 @@ Doing it Manually
|
|||
to use Tux Paint Config.
|
||||
* PNG.txt
|
||||
Notes on creating PNG format bitmapped images for use
|
||||
in Tux Paint
|
||||
in Tux Paint.
|
||||
* SVG.txt
|
||||
Notes on creating SVG format vector images for use in
|
||||
Tux Paint
|
||||
Tux Paint.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ New Breed Software</p>
|
|||
<a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a></p>
|
||||
|
||||
|
||||
<p>July 4, 2007</p>
|
||||
<p>August 2, 2007</p>
|
||||
|
||||
|
||||
</center>
|
||||
|
|
@ -90,7 +90,7 @@ New Breed Software</p>
|
|||
</blockquote>
|
||||
</blockquote>
|
||||
|
||||
<hr size=2 noshade><p>
|
||||
<hr size=2 noshade>
|
||||
|
||||
<h1>Available Options</h1>
|
||||
<blockquote>
|
||||
|
|
@ -215,7 +215,7 @@ New Breed Software</p>
|
|||
|
||||
<dt><code><b>printcfg=yes</b></code></dt>
|
||||
<dd>
|
||||
<p><i>(Windows only)</i></p>
|
||||
<p><i>(Windows and Mac OS X only)</i></p>
|
||||
|
||||
<p>Tux Paint will use a printer configuration file when printing.
|
||||
Push the <b>[Alt]</b> key while clicking the 'Print' button in
|
||||
|
|
@ -399,21 +399,80 @@ New Breed Software</p>
|
|||
|
||||
<dt><code><b>savedir=<i>DIRECTORY</i></b></code></dt>
|
||||
<dd>
|
||||
<p>Use this option to change where Tux Paint saves pictures.
|
||||
By default, this is "<code>~/.tuxpaint/saved/</code>" under Linux
|
||||
and Unix, and "<code>userdata\</code>" under Windows.</p>
|
||||
<p>Use this option to change where Tux Paint's "<code>saved</code>"
|
||||
directory/folder is located, which is where Tux Paint saves and opens
|
||||
pictures.</p>
|
||||
|
||||
<p>This can be useful in a Windows lab, where Tux Paint is
|
||||
installed on a server, and children run it from workstations.
|
||||
You can set <code>savedir</code> to be a folder in their home
|
||||
directory. (e.g., "<code>H:\tuxpaint\</code>")</p>
|
||||
<p>If you do not override it, the <b><i>default</i></b> location is:
|
||||
<ul>
|
||||
<li>Linux & Unix — Under a hidden directory named
|
||||
"<code>.tuxpaint</code>" in your home directory (aka "<code>~</code>"
|
||||
or "<code>$HOME</code>")<br>
|
||||
Example: "<code>/home/<i>username</i>/.tuxpaint/saved/</code>"<br>
|
||||
<br>
|
||||
|
||||
<li>Windows — Inside a folder named "<code>TuxPaint</code>"
|
||||
in your "<code>Application Data</code>" folder.<br>
|
||||
Example: "<code>C:\Documents and Settings\<i>Username</i>\Application Data\TuxPaint\saved\</code>"<br>
|
||||
<br>
|
||||
|
||||
<li>Mac OS X — Inside a folder named "<code>TuxPaint</code>" in your
|
||||
"<code>Application Support</code>" folder.<br>
|
||||
Example: "<code>/Users/<i>Username</i>/Library/Application Support/TuxPaint/saved/</code>"<br>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p><b>Note:</b> When specifying a Windows drive (e.g.,
|
||||
"<code>H:\</code>"), you must also specify a subdirectory.</p>
|
||||
|
||||
<p><b>Note:</b> Prior to version 0.9.18, Tux Paint would also use
|
||||
the setting or default for "<code>savedir</code>" as the place to
|
||||
search for personal data files (brushes, stamps, starters and fonts).
|
||||
As of version 0.9.18, they may be specified separately
|
||||
(see the "<code>datadir</code>" option, below).</p>
|
||||
|
||||
<p><b>Example:</b> <code>savedir=Z:\tuxpaint\</code></p>
|
||||
</dd>
|
||||
|
||||
<dt><code><b>datadir=<i>DIRECTORY</i></b></code></dt>
|
||||
<dd>
|
||||
<p>Use this option to change where Tux Paint looks for personal
|
||||
data files (brushes, stamps, starters and fonts specific to the
|
||||
current user).</p>
|
||||
|
||||
<p>Tux Paint will search for subdirectories/subfolders named
|
||||
"<code>brushes</code>", "<code>stamps</code>", "<code>starters</code>"
|
||||
and "<code>fonts</code>" under the data directory.</p>
|
||||
|
||||
<p>If you do not override it, the <b><i>default</i></b> location is:
|
||||
<ul>
|
||||
<li>Linux & Unix — Under a hidden directory named
|
||||
"<code>.tuxpaint</code>" in your home directory (aka "<code>~</code>"
|
||||
or "<code>$HOME</code>")<br>
|
||||
Example: "<code>/home/<i>username</i>/.tuxpaint/brushes/</code>"<br>
|
||||
<br>
|
||||
|
||||
<li>Windows — Inside a folder named "<code>TuxPaint</code>"
|
||||
in your "<code>Application Data</code>" folder.<br>
|
||||
Example: "<code>C:\Documents and Settings\<i>Username</i>\Application Data\TuxPaint\brushes\</code>"<br>
|
||||
<br>
|
||||
|
||||
<li>Mac OS X — Inside a folder named "<code>TuxPaint</code>" in your
|
||||
"<code>Application Support</code>" folder.<br>
|
||||
Example: "<code>/Users/<i>Username</i>/Library/Application Support/TuxPaint/brushes/</code>"<br>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p><b>Note:</b> Prior to version 0.9.18, Tux Paint would use the
|
||||
same setting or default as for "<code>savedir</code>" to search for
|
||||
data files. As of version 0.9.18, they may be specified separately.</p>
|
||||
|
||||
<p><b>Note:</b> When specifying a Windows drive (e.g.,
|
||||
"<code>H:\</code>"), you must also specify a subdirectory.</p>
|
||||
|
||||
<p><b>Example:</b> <code>datadir=/home/johnny/tuxpaint-data/</code></p>
|
||||
</dd>
|
||||
|
||||
<dt><code><b>saveover=yes</b></code></dt>
|
||||
<dd>
|
||||
This disables the "<i>Save over the old version...?</i>" prompt when
|
||||
|
|
@ -445,12 +504,12 @@ New Breed Software</p>
|
|||
</dd>
|
||||
|
||||
<dt><code><b>autosave=yes</b></code></dt>
|
||||
<dt>
|
||||
<dd>
|
||||
This prevents Tux Paint from asking whether you want to save
|
||||
the current picture when quitting, and assumes you do.
|
||||
</dt>
|
||||
</dd>
|
||||
|
||||
<dt><code><b>startblank=yes</b></code</dt>
|
||||
<dt><code><b>startblank=yes</b></code></dt>
|
||||
<dd>
|
||||
This causes Tux Paint to display a blank canvas when it first
|
||||
starts up, rather than loading the last image that was being edited.
|
||||
|
|
@ -916,6 +975,8 @@ New Breed Software</p>
|
|||
--noprint<br>
|
||||
--printdelay=<i>SECONDS</i><br>
|
||||
--printcfg<br>
|
||||
--altprintnever<br>
|
||||
--altprintalways<br>
|
||||
--papersize=<i>PAPERSIZE</i><br>
|
||||
--simpleshapes<br>
|
||||
--uppercase<br>
|
||||
|
|
@ -932,11 +993,13 @@ New Breed Software</p>
|
|||
--mirrorstamps<br>
|
||||
--keyboard<br>
|
||||
--savedir <i>DIRECTORY</i><br>
|
||||
--datadir <i>DIRECTORY</i><br>
|
||||
--saveover<br>
|
||||
--saveovernew<br>
|
||||
--nosave<br>
|
||||
--autosave<br>
|
||||
--lang <i>LANGUAGE</i><br>
|
||||
--colorfile <i>FILE</i><br>
|
||||
</b></code></dt>
|
||||
<dd>
|
||||
These enable or correspond to the configuration file options
|
||||
|
|
@ -954,6 +1017,7 @@ New Breed Software</p>
|
|||
--print<br>
|
||||
--printdelay=0<br>
|
||||
--noprintcfg<br>
|
||||
--altprintmod<br>
|
||||
--complexshapes<br>
|
||||
--mixedcase<br>
|
||||
--dontgrab<br>
|
||||
|
|
@ -980,7 +1044,7 @@ New Breed Software</p>
|
|||
</dd>
|
||||
|
||||
|
||||
<dt><code><b><a name="locale">--locale locale</a></b></code></dt>
|
||||
<dt><code><b><a name="locale">--locale LOCALE</a></b></code></dt>
|
||||
<dd>
|
||||
<p>Run Tux Paint in one of the support languages.
|
||||
See the "<i><a href="#different_language">Choosing a Different
|
||||
|
|
@ -1652,40 +1716,47 @@ New Breed Software</p>
|
|||
|
||||
<h3><a name="special_fonts">Special Fonts</a></h3>
|
||||
<blockquote>
|
||||
Some languages require special fonts be installed. These font
|
||||
<p>Some languages require special fonts be installed. These font
|
||||
files (which are in TrueType format (TTF)), are much too large to
|
||||
include with the Tux Paint download, and are available
|
||||
separately. (See the table above, under the
|
||||
"<a href="#different_language"><i>Choosing a Different Language</i></a>"
|
||||
section.)<p>
|
||||
section.)</p>
|
||||
|
||||
When running Tux Paint in a language that requires its own font,
|
||||
<p><b>Note:</b> As of version 0.9.18, Tux Paint uses the "SDL_Pango"
|
||||
library, which utilizes the "Pango" library to render text in the user
|
||||
interface, rather than using "SDL_ttf" directly. Unless your copy of
|
||||
Tux Paint was built without Pango support, special fonts should
|
||||
<b><i>no longer be necessary</i></b>.</p>
|
||||
|
||||
<p>When running Tux Paint in a language that requires its own font,
|
||||
Tux Paint will try to load the font file from its system-wide
|
||||
"<code><b>fonts</b></code>" directory (under a
|
||||
"<code><b>locale</b></code>" subdirectory). The name of the file
|
||||
corresponds to the first two letters in the 'locale' code of the
|
||||
language (e.g., "ko" for Korean, "ja" for Japanese,
|
||||
"zh_tw" for Traditional Chinese).<p>
|
||||
"zh_tw" for Traditional Chinese).</p>
|
||||
|
||||
For example, under Linux or Unix, when Tux Paint is run in Korean
|
||||
<p>For example, under Linux or Unix, when Tux Paint is run in Korean
|
||||
(e.g., with the option "<code>--lang korean</code>"),
|
||||
Tux Paint will attempt to load the following font file:<p>
|
||||
Tux Paint will attempt to load the following font file:</p>
|
||||
|
||||
<blockquote>
|
||||
<code>/usr/share/tuxpaint/fonts/locale/<b>ko.ttf</b></code>
|
||||
</blockquote><p>
|
||||
<p><code>/usr/share/tuxpaint/fonts/locale/<b>ko.ttf</b></code></p>
|
||||
</blockquote>
|
||||
|
||||
You can download fonts for supported languages from Tux Paint's
|
||||
<p>You can download fonts for supported languages from Tux Paint's
|
||||
website,
|
||||
<a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a>.
|
||||
(Look in the 'Fonts' section under 'Download.')<p>
|
||||
(Look in the 'Fonts' section under 'Download.')</p>
|
||||
|
||||
Under Unix and Linux, you can use the <code>Makefile</code> that comes
|
||||
with the font to install the font in the appropriate location.<p>
|
||||
<p>Under Unix and Linux, you can use the <code>Makefile</code> that comes
|
||||
with the font to install the font in the appropriate location.</p>
|
||||
</blockquote>
|
||||
|
||||
</blockquote>
|
||||
|
||||
<hr noshade>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ New Breed Software</p>
|
|||
|
||||
<p>June 14, 2002 -
|
||||
|
||||
June 27, 2007</p>
|
||||
August 2, 2007</p>
|
||||
|
||||
</center>
|
||||
|
||||
|
|
@ -456,118 +456,14 @@ New Breed Software</p>
|
|||
<img src="images/tool_magic.png" width=48 height=48 alt="" align=right>
|
||||
|
||||
<p>The 'Magic' tool is actually a set of special tools. Select one of
|
||||
the "magic" effects from the selector on the right, and then
|
||||
click and drag around the picture to apply the effect.</p>
|
||||
the "magic" effects from the selector on the right. Then, depending
|
||||
on the tool, either click and drag around the picture, or simply
|
||||
click the picture once, to apply the effect.</p>
|
||||
|
||||
<br clear=all>
|
||||
|
||||
<dl>
|
||||
<dt><b>Fill</b></dt>
|
||||
<dd>
|
||||
This floods the picture with a color. It lets you quickly
|
||||
fill parts of the picture, as if it were a coloring book.
|
||||
</dd>
|
||||
|
||||
<dt><b>Grass</b></dt>
|
||||
<dd>
|
||||
This paints grass on the image. The higher up the canvas,
|
||||
the smaller the grass is drawn, giving an illusion of perspective.
|
||||
The grass can be tinted various greenish hues by selecting
|
||||
different colors in the color palette.
|
||||
</dd>
|
||||
|
||||
<dt><b>Bricks</b> (Large and Small)</dt>
|
||||
<dd>
|
||||
These two tools intelligently paint large and small brick
|
||||
patterns on the canvas. The bricks can be tinted various redish
|
||||
hues by selecting different colors in the color palette.
|
||||
</dd>
|
||||
|
||||
<dt><b>Rainbow</b></dt>
|
||||
<dd>
|
||||
This is similar to the paint brush, but as you move the mouse
|
||||
around, it cycles through a spectrum of bright colors.
|
||||
</dd>
|
||||
|
||||
<dt><b>Sparkles</b></dt>
|
||||
<dd>
|
||||
This draws glowing sparkles on the canvas, in the currently-selected
|
||||
color.
|
||||
</dd>
|
||||
|
||||
<dt><b>Blur</b></dt>
|
||||
<dd>
|
||||
This makes the picture fuzzy wherever you drag the mouse.
|
||||
</dd>
|
||||
|
||||
<dt><b>Smudge</b></dt>
|
||||
<dd>
|
||||
This pushes the colors around under the mouse, like finger painting
|
||||
with wet paint.
|
||||
</dd>
|
||||
|
||||
<dt><b>Lighten</b></dt>
|
||||
<dd>
|
||||
This fades the colors wherever you drag the mouse.
|
||||
(Do it to the same spot many times, and it will eventually become
|
||||
white.)
|
||||
</dd>
|
||||
|
||||
<dt><b>Darken</b></dt>
|
||||
<dd>
|
||||
This dakrens the colors wherever you drag the mouse.
|
||||
(Do it to the same spot many times, and it will eventually become
|
||||
black.)
|
||||
</dd>
|
||||
|
||||
<dt><b>Chalk</b></dt>
|
||||
<dd>
|
||||
This makes parts of the picture (where you move the mouse)
|
||||
look like a chalk drawing.
|
||||
</dd>
|
||||
|
||||
<dt><b>Blocks</b></dt>
|
||||
<dd>
|
||||
This makes the picture blocky looking ("pixelated") wherever
|
||||
you drag the mouse.
|
||||
</dd>
|
||||
|
||||
<dt><b>Negative</b></dt>
|
||||
<dd>
|
||||
This inverts the colors wherever you drag the mouse.
|
||||
(e.g., white becomes black, and vice versa.)
|
||||
</dd>
|
||||
|
||||
<dt><b>Tint</b></dt>
|
||||
<dd>
|
||||
This changes the parts of the picture to the selected color.
|
||||
</dd>
|
||||
|
||||
<dt><b>Drip</b></dt>
|
||||
<dd>
|
||||
This makes the paint "drip" wherever you move the mouse.
|
||||
</dd>
|
||||
|
||||
<dt><b>Cartoon</b></dt>
|
||||
<dd>
|
||||
This makes the picture look like a cartoon — with thick
|
||||
outlines and bright, solid colors — wherever you move the mouse.
|
||||
</dd>
|
||||
|
||||
<dt><b>Mirror</b></dt>
|
||||
<dd>
|
||||
When you click the mouse in your picture with the "Mirror"
|
||||
magic effect selected, the entire image will be reversed,
|
||||
turning it into a mirror image.
|
||||
</dd>
|
||||
|
||||
<dt><b>Flip</b></dt>
|
||||
<dd>
|
||||
Similar to "Mirror." Click and the entire image will be turned
|
||||
upside-down.
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
<p>Each 'Magic' tool's instructions are contained within the
|
||||
"<a href="../magic-docs/html/">magic-docs</a>" folder.</p>
|
||||
|
||||
<hr size=1>
|
||||
</dd>
|
||||
|
|
@ -1120,17 +1016,21 @@ New Breed Software</p>
|
|||
folder/directory) include:
|
||||
|
||||
<ul>
|
||||
<li><a href="../magic-docs/html/">"Magic" Tool Documentation
|
||||
("magic-docs")</a><br>
|
||||
Documentation for each of the currently-installed "Magic" tools.
|
||||
|
||||
<li><a href="../AUTHORS.txt">AUTHORS.txt</a><br>
|
||||
List of authors and contributors
|
||||
List of authors and contributors.
|
||||
|
||||
<li><a href="../CHANGES.txt">CHANGES.txt</a><br>
|
||||
Summary of changed between releases
|
||||
Summary of changed between releases.
|
||||
|
||||
<li><a href="../COPYING.txt">COPYING.txt</a><br>
|
||||
Copying license (The GNU General Public License)
|
||||
Copying license (The GNU General Public License).
|
||||
|
||||
<li><a href="../INSTALL.txt">INSTALL.txt</a><br>
|
||||
Instructions for compiling/installing, when applicable
|
||||
Instructions for compiling/installing, when applicable.
|
||||
|
||||
<li><a href="EXTENDING.html">EXTENDING.html</a><br>
|
||||
Detailed instructions on creating brushes, stamps and starters,
|
||||
|
|
@ -1141,10 +1041,10 @@ New Breed Software</p>
|
|||
for those who don't want to use Tux Paint Config.
|
||||
|
||||
<li><a href="../PNG.txt">PNG.txt</a><br>
|
||||
Notes on creating PNG format bitmapped images for use in Tux Paint
|
||||
Notes on creating PNG format bitmapped images for use in Tux Paint.
|
||||
|
||||
<li><a href="../SVG.txt">SVG.txt</a><br>
|
||||
Notes on creating SVG format vector images for use in Tux Paint
|
||||
Notes on creating SVG format vector images for use in Tux Paint.
|
||||
|
||||
</ul>
|
||||
</blockquote>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
July 5, 2007 - July 31, 2007
|
||||
July 5, 2007 - August 2, 2007
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ Interfaces
|
|||
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.
|
||||
header files) for building a plugin. (See "Compiling", below.)
|
||||
|
||||
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
|
||||
|
|
@ -553,29 +553,86 @@ Compiling
|
|||
shared object file (".so") based on your 'Magic' tool plugin's C
|
||||
source code.
|
||||
|
||||
Additionally, use the "tp-magic-config --cflags" command, supplied as
|
||||
part of Tux Paint, to provide additional command-line flags to your C
|
||||
compiler that will help it build your plugin.
|
||||
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.
|
||||
|
||||
As a stand-alone command, using the GNU C Compiler and BASH shell, for
|
||||
example:
|
||||
Command-Line Example
|
||||
|
||||
$ gcc -shared `tp-magic-config --cflags` my_plugin.c -o my_plugin.so
|
||||
As a stand-alone command, using the GNU C Compiler and BASH shell,
|
||||
for example:
|
||||
|
||||
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 ...").
|
||||
$ gcc -shared `tp-magic-config --cflags` my_plugin.c -o
|
||||
my_plugin.so
|
||||
|
||||
A snippet from a more generalized Makefile might look like this:
|
||||
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 ...").
|
||||
|
||||
+----------------------------------------------------+
|
||||
| CFLAGS=-Wall -O2 $(shell tp-magic-config --cflags) |
|
||||
| |
|
||||
| my_plugin.so: my_plugin.c |
|
||||
| $(CC) -shared $(CFLAGS) -o $@ $< |
|
||||
+----------------------------------------------------+
|
||||
Makefile Example
|
||||
|
||||
A snippet from a Makefile to compile a Tux Paint "Magic" tool plugin
|
||||
might look like this:
|
||||
|
||||
+------------------------------------------------------+
|
||||
| CFLAGS=-Wall -O2 $(shell tp-magic-config --cflags) |
|
||||
| |
|
||||
| my_plugin.so: my_plugin.c |
|
||||
| gcc -shared $(CFLAGS) -o my_plugin.so my_plugin.c |
|
||||
+------------------------------------------------------+
|
||||
|
||||
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.)
|
||||
|
||||
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.)
|
||||
|
||||
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".
|
||||
|
||||
Note: Commands listed below a Makefile target should be intented
|
||||
using a single tab character.
|
||||
|
||||
Advanced Makefile
|
||||
|
||||
An even more generalized Makefile might look like this:
|
||||
|
||||
+----------------------------------------------------+
|
||||
| CFLAGS=-Wall -O2 $(shell tp-magic-config --cflags) |
|
||||
| |
|
||||
| my_plugin_1.so: my_plugin_1.c |
|
||||
| $(CC) -shared $(CFLAGS) -o $@ $< |
|
||||
| |
|
||||
| my_plugin_2.so: my_plugin_2.c |
|
||||
| $(CC) -shared $(CFLAGS) -o $@ $< |
|
||||
+----------------------------------------------------+
|
||||
|
||||
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...
|
||||
|
||||
"$(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 it with the target's
|
||||
dependency, in this case "my_plugin_1.c" or "my_plugin_2.c".
|
||||
|
||||
Windows
|
||||
|
||||
|
|
@ -591,54 +648,108 @@ Installing
|
|||
|
||||
Linux and other Unix-like Platforms
|
||||
|
||||
Use the "tp-magic-config --pluginprefix" command, supplied as part of
|
||||
Tux Paint, 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 version of Tux Paint looks for
|
||||
plugins (e.g., "").
|
||||
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.
|
||||
|
||||
As stand-alone commands, using the BASH shell, for example:
|
||||
Shared Object
|
||||
|
||||
# cp my_plugin.so `tp-magic-config --pluginprefix`
|
||||
# chmod 644 `tp-magic-config --pluginprefix`/my_plugin.so
|
||||
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").
|
||||
|
||||
Additionally, 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.
|
||||
As stand-alone commands, using the BASH shell, for example:
|
||||
|
||||
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.
|
||||
# cp my_plugin.so `tp-magic-config --pluginprefix`
|
||||
# chmod 644 `tp-magic-config --pluginprefix`/my_plugin.so
|
||||
|
||||
As stand-alone commands, using the BASH shell, for example:
|
||||
Note: See the note above regarding the "`" (grave) character.
|
||||
|
||||
# cp my_plugin_icon.png `tp-magic-config --dataprefix`/images/magic/
|
||||
# chmod 644 `tp-magic-config
|
||||
--dataprefix`/images/magic/my_plugin_icon.png
|
||||
Documentation
|
||||
|
||||
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").
|
||||
|
||||
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.
|
||||
|
||||
As stand-alone commands, using the BASH shell, for example:
|
||||
|
||||
# cp my_plugin.html `tp-magic-config --plugindocprefix`/html
|
||||
# cp my_plugin.txt `tp-magic-config --plugindocprefix`
|
||||
|
||||
Note: See the note above regarding the "`" (grave) character.
|
||||
|
||||
Icons, Sounds and other Data Files
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
As stand-alone commands, using the BASH shell, for example:
|
||||
|
||||
# cp my_plugin_icon.png `tp-magic-config
|
||||
--dataprefix`/images/magic/
|
||||
# chmod 644 `tp-magic-config
|
||||
--dataprefix`/images/magic/my_plugin_icon.png
|
||||
|
||||
Note: See the note above regarding the "`" (grave) character.
|
||||
|
||||
Putting it Together in a Makefile
|
||||
|
||||
A snippet from a more generalized Makefile might look like this:
|
||||
|
||||
+------------------------------------------------------+
|
||||
| PLUGINPREFIX=$(shell tp-magic-config --pluginprefix) |
|
||||
| DATAPREFIX=$(shell tp-magic-config --dataprefix) |
|
||||
| |
|
||||
| install: |
|
||||
| mkdir -p $(PLUGINPREFIX) |
|
||||
| cp *.so $(PLUGINPREFIX)/ |
|
||||
| chmod 644 $(PLUGINPREFIX)/*.so |
|
||||
| mkdir -p $(DATAPREFIX)/images/magic |
|
||||
| cp *.png $(DATAPREFIX)/images/magic/ |
|
||||
| chmod 644 $(DATAPREFIX)/images/magic/*.png |
|
||||
+------------------------------------------------------+
|
||||
+------------------------------------------------------------+
|
||||
| PLUGINPREFIX=$(shell tp-magic-config --pluginprefix) |
|
||||
| PLUGINDOCPREFIX=$(shell tp-magic-config --plugindocprefix) |
|
||||
| DATAPREFIX=$(shell tp-magic-config --dataprefix) |
|
||||
| |
|
||||
| install: |
|
||||
| # |
|
||||
| # Install plugin |
|
||||
| mkdir -p $(PLUGINPREFIX) |
|
||||
| cp *.so $(PLUGINPREFIX)/ |
|
||||
| chmod 644 $(PLUGINPREFIX)/*.so |
|
||||
| # |
|
||||
| # Install icons |
|
||||
| mkdir -p $(DATAPREFIX)/images/magic |
|
||||
| cp icons/*.png $(DATAPREFIX)/images/magic/ |
|
||||
| chmod 644 $(DATAPREFIX)/images/magic/*.png |
|
||||
| # |
|
||||
| # Install sound effects |
|
||||
| mkdir -p $(DATAPREFIX)/sounds/magic |
|
||||
| cp sounds/*.ogg $(DATAPREFIX)/sounds/magic/ |
|
||||
| chmod 644 $(DATAPREFIX)/sounds/magic/*.ogg |
|
||||
| # |
|
||||
| # Install docs |
|
||||
| mkdir -p $(PLUGINDOCPREFIX)/html |
|
||||
| cp docs/*.html $(PLUGINDOCPREFIX)/html/ |
|
||||
| cp docs/*.txt $(PLUGINDOCPREFIX)/ |
|
||||
| chmod 644 $(PLUGINDOCPREFIX)/html/*.html |
|
||||
| chmod 644 $(PLUGINDOCPREFIX)/*.txt |
|
||||
+------------------------------------------------------------+
|
||||
|
||||
The first two lines set up Makefile variables that contain the paths
|
||||
returned by the "tp-magic-config" command-line tool.
|
||||
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.)
|
||||
|
||||
Below that is an "install" target in the Makefile. (Invoked by, for
|
||||
example, "$ sudo make install" or "# make install".)
|
||||
|
|
@ -648,7 +759,9 @@ Installing
|
|||
into it, and invokes "chmod" to make sure they are readable.
|
||||
|
||||
It then does a similar series of commands to install icon files
|
||||
(".png" images) into a subdirectory within Tux Paint's data
|
||||
(".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.
|
||||
|
||||
Windows
|
||||
|
|
@ -696,7 +809,10 @@ Creating plugins with multiple effects
|
|||
|
||||
for (i = 0; i < NUM_TOOLS; i++)
|
||||
{
|
||||
snprintf(fname, sizeof(fname), "%s/%s",
|
||||
/* Becomes, for example,
|
||||
"/usr/share/tuxpaint/sounds/magic/one.ogg" */
|
||||
|
||||
snprintf(fname, sizeof(fname), "%s/sounds/magic/%s",
|
||||
api->data_prefix, my_plugin_snd_filenames[i];
|
||||
|
||||
my_plugin_snds[i] = Mix_LoadWAV(fname);
|
||||
|
|
@ -705,6 +821,11 @@ Creating plugins with multiple effects
|
|||
* Similarly, do the same to free them later (such as freeing sound
|
||||
effects during your "shutdown()").
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NUM_TOOLS; i++)
|
||||
Mix_FreeChunk(my_plugin_snds[i]);
|
||||
|
||||
* Use "which" values sent to your functions as an index into those
|
||||
arrays (e.g., for playing the appropriate sound effect for a tool).
|
||||
|
||||
|
|
@ -787,6 +908,8 @@ Glossary
|
|||
* free(): A C function that frees (deallocates) memory allocated by
|
||||
other C functions (such as "strdup()").
|
||||
* function: See "C function"
|
||||
* gcc: TBD (See also the "gcc(1)" man page)
|
||||
* 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"
|
||||
|
|
@ -807,6 +930,8 @@ Glossary
|
|||
* macro: TBD
|
||||
* 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: TBD
|
||||
* Makefile: TBD
|
||||
* Magic tool: One of a number of effects or drawing tools in Tux Paint,
|
||||
made available via the "Magic" tool button.
|
||||
* Mix_Chunk *: (A pointer to) a C structure defined by SDL_mixer that
|
||||
|
|
@ -816,9 +941,10 @@ Glossary
|
|||
* Mix_LoadWAV(): An SDL_mixer function that loads a sound file (WAV,
|
||||
Ogg Vorbis, etc.) and returns it as a "Mix_Chunk *".
|
||||
* namespace: TBD
|
||||
* Ogg Vorbis: TBD
|
||||
* OGG: See "Ogg Vorbis"
|
||||
* Ogg Vorbis: TBD (See also: "WAV")
|
||||
* Plugin: TBD
|
||||
* PNG: TBD
|
||||
* PNG: TBD (See also the "png(5) man page)
|
||||
* pointer: See "C pointer"
|
||||
* red: See "RGBA"
|
||||
* release: The action of releasing a button on a mouse.
|
||||
|
|
@ -827,19 +953,21 @@ Glossary
|
|||
* saturation: See "HSV"
|
||||
* SDL: See "Simple DirectMedia Layer"
|
||||
* SDL_FreeSurface(): An libSDL function that frees (deallocates) memory
|
||||
allocated for an SDL surface ("SDL_Surface *").
|
||||
allocated for an SDL surface ("SDL_Surface *"). (See also the
|
||||
"SDL_FreeSurface(3)" man page)
|
||||
* SDL_GetRGB(): 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);".)
|
||||
&b);".) (See also the "SDL_GetRGB(3)" man page)
|
||||
* SDL_MapRGB(): 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));".)
|
||||
(See also the "SDL_MapRGB(3)" man page)
|
||||
* SDL_image: A library on top of libSDL that can load various kinds of
|
||||
image files (e.g., PNG) and return them as an "SDL_Surface *".
|
||||
* SDL_mixer: A library on top of libSDL that can load various kinds of
|
||||
|
|
@ -848,15 +976,15 @@ Glossary
|
|||
* SDL_Rect: 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).
|
||||
rectangle (w,h). (See also the "SDL_Rect(3)" man page)
|
||||
* SDL_Surface *: (A pointer to) a C structure defined by libSDL that
|
||||
contains a drawing surface.
|
||||
contains a drawing surface. (See also the "SDL_Surface(3)" man page)
|
||||
* Shared Object: A piece of code that's compiled separately from the
|
||||
main application, and loaded dynamically, at runtime.
|
||||
* Simple DirectMedia Layer: A programming library that allows programs
|
||||
portable low level access to a video framebuffer, audio output, mouse,
|
||||
and keyboard.
|
||||
* snprintf(): TBD
|
||||
and keyboard. (See also: http://www.libsdl.org/)
|
||||
* snprintf(): TBD (See also the "snprintf(3)" man page)
|
||||
* .so: See "Shared Object"
|
||||
* sRBG: See "RGBA"
|
||||
* star: "*". A symbol in C that, when used in the declaration of
|
||||
|
|
@ -869,7 +997,7 @@ Glossary
|
|||
integer that's being pointed to.)
|
||||
* 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.
|
||||
the new copy. (See also the "strdup(3)" man page)
|
||||
* struct: See "C structure"
|
||||
* The GIMP: An Open Source image manipulation and paint program.
|
||||
* tp_magic_api.h: A header file that defines Tux Paint's Magic tool API.
|
||||
|
|
@ -877,7 +1005,8 @@ Glossary
|
|||
* tp-magic-config: 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).
|
||||
shared objects and data files should be installed). (See also the
|
||||
"tp-magic-config(3)" man page.)
|
||||
* Uint32: A 32-bit, unsigned integer (defined by libSDL). In other
|
||||
words, four bytes that can represent 0 through 4294967295. (Typically
|
||||
used to hold enough information to store three or four bytes
|
||||
|
|
@ -887,6 +1016,6 @@ Glossary
|
|||
* unsigned: TBD
|
||||
* value: See "HSV"
|
||||
* variable: TBD
|
||||
* WAV: TBD
|
||||
* WAV: TBD (See also "Ogg Vorbis")
|
||||
* (w,h): See "Dimensions"
|
||||
* (x,y): See "Coordinates"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ New Breed Software</p>
|
|||
<p><a href="mailto:bill@newbreedsoftware.com">bill@newbreedsoftware.com</a><br>
|
||||
<a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a></p>
|
||||
|
||||
<p>July 5, 2007 - July 31, 2007</p>
|
||||
<p>July 5, 2007 - August 2, 2007</p>
|
||||
</center>
|
||||
|
||||
<hr size=2 noshade>
|
||||
|
|
@ -79,7 +79,7 @@ concept.)</p>
|
|||
<li><a href="#multiple">Creating plugins with multiple effects</a>
|
||||
<li><a href="#">Example Code</a>
|
||||
<li><a href="#">Getting Help</a>
|
||||
<li><a href="#">Glossary</a>
|
||||
<li><a href="#glossary">Glossary</a>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
@ -126,7 +126,8 @@ invokes them.</p>
|
|||
Also, when you run the C compiler to build a plugin, you should use the
|
||||
command-line tool "<code>tp-magic-config</code>" 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.</p>
|
||||
plugin header file, as well as SDL's header files) for building a plugin.
|
||||
(See "<a href="#compiling">Compiling</a>", below.)</p>
|
||||
|
||||
<p>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
|
||||
|
|
@ -711,9 +712,15 @@ also contains some helper macros that you may use.</p>
|
|||
a shared object file ("<code>.so</code>") based on your 'Magic' tool
|
||||
plugin's C source code.</p>
|
||||
|
||||
<p>Additionally, use the "<code>tp-magic-config --cflags</code>" command,
|
||||
supplied as part of Tux Paint, to provide additional command-line
|
||||
flags to your C compiler that will help it build your plugin.</p>
|
||||
<p>Use the "<code>tp-magic-config --cflags</code>" 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.</p>
|
||||
|
||||
<h4>Command-Line Example</h4>
|
||||
|
||||
<blockquote>
|
||||
|
||||
<p>As a stand-alone command, using the GNU C Compiler and BASH shell,
|
||||
for example:</p>
|
||||
|
|
@ -724,7 +731,8 @@ also contains some helper macros that you may use.</p>
|
|||
</code></p>
|
||||
</blockquote>
|
||||
|
||||
<p><b>Note:</b> The characters around the "<code>tp-magic-config</code>"
|
||||
<p><a name="grave"><b>Note:</b></a>
|
||||
The characters around the "<code>tp-magic-config</code>"
|
||||
command are a grave/backtick/backquote
|
||||
("<code><b><font size=+1>`</font></b></code>"), and
|
||||
not an apostrophe/single-quote ("<code><b><font size=+1>'</font></b></code>").
|
||||
|
|
@ -733,17 +741,87 @@ also contains some helper macros that you may use.</p>
|
|||
as an argument to the command being executed (in this case,
|
||||
"<code>gcc ...</code>").</p>
|
||||
|
||||
<p>A snippet from a more generalized Makefile might look like this:</p>
|
||||
</blockquote>
|
||||
|
||||
<h4>Makefile Example</h4>
|
||||
|
||||
<blockquote>
|
||||
|
||||
<p>A snippet from a Makefile to compile a Tux Paint "Magic" tool
|
||||
plugin might look like this:</p>
|
||||
|
||||
<blockquote><table border=1 cellspacing=0 cellpadding=4><tr><td>
|
||||
<p><code>
|
||||
CFLAGS=-Wall -O2 $(shell tp-magic-config --cflags)<br>
|
||||
<br>
|
||||
my_plugin.so: my_plugin.c<br>
|
||||
gcc -shared $(CFLAGS) -o my_plugin.so my_plugin.c
|
||||
</code></p>
|
||||
</td></tr></table></blockquote>
|
||||
|
||||
<p>The first line sets up Makefile variable ("<code>CFLAGS</code>") that
|
||||
contains flags for the compiler. "<code>-Wall</code>" asks for all compiler
|
||||
warnings to be shown. "<code>-O2</code>" asks for level 2 optimization.
|
||||
"<code>($shell tp-magic-config --cflags)</code>" runs
|
||||
"<code>tp-magic-config</code>" to retrieve additional compiler flags that
|
||||
"Magic" tool plugins require. (The "<code>$(shell ...)</code>"
|
||||
directive is similar to the <a href="#grave"><b><font size=+1>`</font></b>
|
||||
("grave")</a> character in the BASH shell examples, above.)</p>
|
||||
|
||||
<p>The next line defines a Makefile target, "<code>my_plugin.so</code>",
|
||||
and states that it <i>depends on</i> the C source file
|
||||
"<code>my_plugin.c</code>". (Any time the C file changes, "<code>make</code>"
|
||||
will know to recompile it and produce an updated "<code>.so</code>" file.
|
||||
If the C file hadn't changed, it won't bother recompiling.)</p>
|
||||
|
||||
<p>The last line defines the command "<code>make</code>" should
|
||||
run when it determines that it needs to (re)compile the "<code>.so</code>"
|
||||
file. Here, we're using "<code>gcc</code>", with "<code>-shared</code> and
|
||||
"<code>$(CFLAGS)</code>" command-line arguments, like above.
|
||||
"<code>-o my_plugin.so</code>" tells the C compiler that the output file
|
||||
should be "<code>my_plugin.so</code>". The last argument is the C file to
|
||||
compile, in this case "<code>my_plugin.c</code>".</p>
|
||||
|
||||
<p><b>Note:</b> Commands listed below a Makefile target should be
|
||||
intented using a single <b>tab</b> character.</p>
|
||||
|
||||
</blockquote>
|
||||
|
||||
<h4>Advanced Makefile</h4>
|
||||
|
||||
<blockquote>
|
||||
|
||||
<p>An even more generalized Makefile might look like this:</p>
|
||||
|
||||
<blockquote><table border=1 cellspacing=0 cellpadding=4><tr><td>
|
||||
<p><code>
|
||||
CFLAGS=-Wall -O2 $(shell tp-magic-config --cflags)<br>
|
||||
<br>
|
||||
my_plugin_1.so: my_plugin_1.c<br>
|
||||
$(CC) -shared $(CFLAGS) -o $@ $<<br>
|
||||
<br>
|
||||
my_plugin_2.so: my_plugin_2.c<br>
|
||||
$(CC) -shared $(CFLAGS) -o $@ $<
|
||||
</code></p>
|
||||
</td></tr></table></blockquote>
|
||||
|
||||
<p>As before, there are lines that define the command "<code>make</code>"
|
||||
should run when it determines that it needs to (re)compile the
|
||||
"<code>.so</code>" file(s). However, more general terms are used...</p>
|
||||
|
||||
<p>"<code>$(CC)</code>" gets expanded to your default C compiler (e.g.,
|
||||
"<code>gcc</code>"). "<code>-shared</code> and "<code>$(CFLAGS)</code>"
|
||||
are command-line arguments to the compiler, like above.
|
||||
"<code>-o $@</code>" tells the C compiler what the output file
|
||||
should be; "<code>make</code>" replaces "<code>$@</code>" with the name
|
||||
of the target, in this case "<code>my_plugin_1.so</code>" or
|
||||
"<code>my_plugin_2.so</code>". And finally,
|
||||
the last argument is the C file to compile; "<code>make</code>" replaces
|
||||
it with the target's dependency, in this case
|
||||
"<code>my_plugin_1.c</code>" or "<code>my_plugin_2.c</code>".</p>
|
||||
|
||||
</blockquote>
|
||||
|
||||
</blockquote>
|
||||
|
||||
<h3>Windows</h3>
|
||||
|
|
@ -769,23 +847,70 @@ also contains some helper macros that you may use.</p>
|
|||
<h3>Linux and other Unix-like Platforms</h3>
|
||||
|
||||
<blockquote>
|
||||
<p>Use the "<code>tp-magic-config --pluginprefix</code>"
|
||||
command, supplied as part of Tux Paint, to determine where the
|
||||
plugin shared object ("<code>.so</code>") files should be installed.
|
||||
The value returned by this command will be the global location where
|
||||
the installed version of Tux Paint looks for plugins
|
||||
(e.g., "<code></code>").</p>
|
||||
<p>Use the "<code>tp-magic-config</code>" 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.</p>
|
||||
|
||||
<h4>Shared Object</h4>
|
||||
|
||||
<blockquote>
|
||||
|
||||
<p>Use "<code>tp-magic-config --pluginprefix</code>"
|
||||
to determine where the plugin shared object ("<code>.so</code>")
|
||||
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., "<code>/usr/lib/tuxpaint/plugins</code>").</p>
|
||||
|
||||
<p>As stand-alone commands, using the BASH shell, for example:</p>
|
||||
|
||||
<blockquote>
|
||||
<p><code>
|
||||
# cp my_plugin.so `tp-magic-config --pluginprefix`<br>
|
||||
# chmod 644 `tp-magic-config --pluginprefix`/my_plugin.so
|
||||
# chmod 644 `tp-magic-config --pluginprefix`/my_plugin.so<br>
|
||||
</code></p>
|
||||
</blockquote>
|
||||
|
||||
<p>Additionally, use the "<code>tp-magic-config --dataprefix</code>"
|
||||
<p><b>Note:</b> See the <a href="#grave">note above regarding the
|
||||
"<font size=+1><b>`</b></font>" (grave) character</a>.</p>
|
||||
|
||||
</blockquote>
|
||||
|
||||
<h4>Documentation</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>Use the "<code>tp-magic-config --plugindocprefix</code>"
|
||||
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</p>
|
||||
(e.g., "<code>/usr/share/doc/tuxpaint/magic-docs</code>").</p>
|
||||
|
||||
<p><b>Note:</b> It's best to include both HTML and plain-text versions
|
||||
of your documentation. An "<code>html</code>" subdirectory exists within
|
||||
the "<code>magic-docs</code>" directory, and is where the HTML versions
|
||||
should go.</p>
|
||||
|
||||
<p>As stand-alone commands, using the BASH shell, for example:</p>
|
||||
|
||||
<blockquote>
|
||||
<p><code>
|
||||
# cp my_plugin.html `tp-magic-config --plugindocprefix`/html<br>
|
||||
# cp my_plugin.txt `tp-magic-config --plugindocprefix`
|
||||
</code></p>
|
||||
</blockquote>
|
||||
|
||||
<p><b>Note:</b> See the <a href="#grave">note above regarding the
|
||||
"<font size=+1><b>`</b></font>" (grave) character</a>.</p>
|
||||
|
||||
</blockquote>
|
||||
|
||||
<h4>Icons, Sounds and other Data Files</h4>
|
||||
|
||||
<blockquote>
|
||||
|
||||
<p>Use the "<code>tp-magic-config --dataprefix</code>"
|
||||
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
|
||||
|
|
@ -807,6 +932,11 @@ also contains some helper macros that you may use.</p>
|
|||
</code></p>
|
||||
</blockquote>
|
||||
|
||||
<p><b>Note:</b> See the <a href="#grave">note above regarding the
|
||||
"<font size=+1><b>`</b></font>" (grave) character</a>.</p>
|
||||
|
||||
</blockquote>
|
||||
|
||||
<h4>Putting it Together in a Makefile</h4>
|
||||
|
||||
<blockquote>
|
||||
|
|
@ -816,20 +946,40 @@ also contains some helper macros that you may use.</p>
|
|||
<blockquote><table border=1 cellspacing=0 cellpadding=4><tr><td>
|
||||
<p><code>
|
||||
PLUGINPREFIX=$(shell tp-magic-config --pluginprefix)<br>
|
||||
PLUGINDOCPREFIX=$(shell tp-magic-config --plugindocprefix)<br>
|
||||
DATAPREFIX=$(shell tp-magic-config --dataprefix)<br>
|
||||
<br>
|
||||
install:<br>
|
||||
#<br>
|
||||
# Install plugin<br>
|
||||
mkdir -p $(PLUGINPREFIX)<br>
|
||||
cp *.so $(PLUGINPREFIX)/<br>
|
||||
chmod 644 $(PLUGINPREFIX)/*.so<br>
|
||||
#<br>
|
||||
# Install icons<br>
|
||||
mkdir -p $(DATAPREFIX)/images/magic<br>
|
||||
cp *.png $(DATAPREFIX)/images/magic/<br>
|
||||
chmod 644 $(DATAPREFIX)/images/magic/*.png
|
||||
cp icons/*.png $(DATAPREFIX)/images/magic/<br>
|
||||
chmod 644 $(DATAPREFIX)/images/magic/*.png<br>
|
||||
#<br>
|
||||
# Install sound effects<br>
|
||||
mkdir -p $(DATAPREFIX)/sounds/magic<br>
|
||||
cp sounds/*.ogg $(DATAPREFIX)/sounds/magic/<br>
|
||||
chmod 644 $(DATAPREFIX)/sounds/magic/*.ogg<br>
|
||||
#<br>
|
||||
# Install docs<br>
|
||||
mkdir -p $(PLUGINDOCPREFIX)/html<br>
|
||||
cp docs/*.html $(PLUGINDOCPREFIX)/html/<br>
|
||||
cp docs/*.txt $(PLUGINDOCPREFIX)/<br>
|
||||
chmod 644 $(PLUGINDOCPREFIX)/html/*.html<br>
|
||||
chmod 644 $(PLUGINDOCPREFIX)/*.txt<br>
|
||||
</code></p>
|
||||
</td></tr></table></blockquote>
|
||||
|
||||
<p>The first two lines set up Makefile variables that contain the
|
||||
paths returned by the "<code>tp-magic-config</code>" command-line tool.</p>
|
||||
<p>The first three lines set up Makefile variables that contain the
|
||||
paths returned by the "<code>tp-magic-config</code>" command-line tool.
|
||||
(The "<code>$(shell ...)</code>" directive is similar to the
|
||||
<a href="#grave"><b><font size=+1>`</font></b> ("grave")</a> character
|
||||
in the BASH shell examples, above.)</p>
|
||||
|
||||
<p>Below that is an "<code>install</code>" target in the Makefile.
|
||||
(Invoked by, for example, "<code>$ sudo make install</code>"
|
||||
|
|
@ -841,8 +991,11 @@ also contains some helper macros that you may use.</p>
|
|||
"<code>chmod</code>" to make sure they are readable.</p>
|
||||
|
||||
<p>It then does a similar series of commands to install icon files
|
||||
("<code>.png</code>" images) into a subdirectory within Tux Paint's
|
||||
data directory.</p>
|
||||
("<code>.png</code>" images) and sound effects
|
||||
("<code>.ogg</code>" files) into subdirectories within Tux Paint's
|
||||
data directory, and to install documentation
|
||||
("<code>.html</code>" and "<code>.txt</code>" files) within Tux Paint's
|
||||
documentation directory.</p>
|
||||
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
|
|
@ -905,7 +1058,9 @@ effects:</p>
|
|||
<br>
|
||||
for (i = 0; i < NUM_TOOLS; i++)<br>
|
||||
{<br>
|
||||
snprintf(fname, sizeof(fname), "%s/%s",<br>
|
||||
/* Becomes, for example, "/usr/share/tuxpaint/sounds/magic/one.ogg" */<br>
|
||||
<br>
|
||||
snprintf(fname, sizeof(fname), "%s/sounds/magic/%s",<br>
|
||||
api->data_prefix, my_plugin_snd_filenames[i];<br>
|
||||
<br>
|
||||
my_plugin_snds[i] = Mix_LoadWAV(fname);<br>
|
||||
|
|
@ -914,7 +1069,12 @@ effects:</p>
|
|||
|
||||
<li>Similarly, do the same to free them later (such as freeing
|
||||
sound effects during your "<code>shutdown()</code>").<br>
|
||||
<br>
|
||||
<blockquote><code>
|
||||
int i;<br>
|
||||
<br>
|
||||
for (i = 0; i < NUM_TOOLS; i++)<br>
|
||||
Mix_FreeChunk(my_plugin_snds[i]);
|
||||
</code></blockquote>
|
||||
|
||||
<li>Use "<code>which</code>" values sent to your functions as an
|
||||
index into those arrays (e.g., for playing the appropriate sound effect
|
||||
|
|
@ -960,7 +1120,7 @@ mailing lists:
|
|||
|
||||
<hr size=1 noshade>
|
||||
|
||||
<h2>Glossary</h2>
|
||||
<h2><a name="glossary">Glossary</a></h2>
|
||||
|
||||
<ul>
|
||||
<li><b>alpha:</b> See "RGBA"
|
||||
|
|
@ -999,6 +1159,8 @@ mailing lists:
|
|||
<li><b>format:</b> <i>TBD</i>
|
||||
<li><b>free():</b> A C function that frees (deallocates) memory allocated by other C functions (such as "<code>strdup()</code>").
|
||||
<li><b>function:</b> See "C function"
|
||||
<li><b>gcc:</b> <i>TBD</i> (See also the "<code>gcc(1)</code>" <i>man page</i>)
|
||||
<li><b>GNU C Compiler:</b> See "gcc"
|
||||
<li><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><b>green:</b> See "RGBA"
|
||||
<li><b>->:</b> See "arrow"
|
||||
|
|
@ -1015,14 +1177,17 @@ mailing lists:
|
|||
<li><b>linear:</b> <i>TBD</i>
|
||||
<li><b>macro:</b> <i>TBD</i>
|
||||
<li><b>magic_api:</b> A C structure that is passed along to a plugin's functions that exposes data and functions within the running copy of Tux Paint.
|
||||
<li><b>make:</b> <i>TBD</i>
|
||||
<li><b>Makefile:</b> <i>TBD</i>
|
||||
<li><b>Magic tool</b>: One of a number of effects or drawing tools in Tux Paint, made available via the "Magic" tool button.
|
||||
<li><b>Mix_Chunk *:</b> (A pointer to) a C structure defined by SDL_mixer that contains a sound.
|
||||
<li><b>Mix_FreeChunk():</b> An SDL_mixer function that frees (deallocates) memory allocated for an SDL_mixer sound 'chunk' ("<code>Mix_Chunk *</code>").
|
||||
<li><b>Mix_LoadWAV():</b> An SDL_mixer function that loads a sound file (WAV, Ogg Vorbis, etc.) and returns it as a "<code>Mix_Chunk *</code>".
|
||||
<li><b>namespace:</b> <i>TBD</i>
|
||||
<li><b>Ogg Vorbis:</b> <i>TBD</i>
|
||||
<li><b>OGG</b>: See "Ogg Vorbis"
|
||||
<li><b>Ogg Vorbis:</b> <i>TBD</i> (See also: "WAV")
|
||||
<li><b>Plugin</b>: <i>TBD</i>
|
||||
<li><b>PNG:</b> <i>TBD</i>
|
||||
<li><b>PNG:</b> <i>TBD</i> (See also the "<code>png(5)</code> <i>man page</i>)
|
||||
<li><b>pointer:</b> See "C pointer"
|
||||
<li><b>red:</b> See "RGBA"
|
||||
<li><b>release:</b> The action of releasing a button on a mouse.
|
||||
|
|
@ -1030,30 +1195,30 @@ mailing lists:
|
|||
<li><b>RGB:</b> See "RBGA"
|
||||
<li><b>saturation:</b> See "HSV"
|
||||
<li><b>SDL:</b> See "Simple DirectMedia Layer"
|
||||
<li><b>SDL_FreeSurface():</b> An libSDL function that frees (deallocates) memory allocated for an SDL surface ("<code>SDL_Surface *</code>").
|
||||
<li><b>SDL_GetRGB():</b> A libSDL function that, given a <code>Uint32</code> pixel value (e.g., one returned from the Tux Paint's Magic tool API helper function "<code>getpixel()</code>"), the format of the surface the pixel was taken from, and pointers to three <code>Uint8</code> variables, will place the Red, Green and Blue (RGB) values of the pixel into the three <code>Uint8</code> variables. (Example: "<code>SDL_GetRGB(getpixel(surf, x, y), surf->format, &r, &g, &b);</code>".)
|
||||
<li><b>SDL_MapRGB():</b> A libSDL function that, given the format of a surface and <code>Uint8</code> values representing Red, Green and Blue values for a pixel, returns a <code>Uint32</code> pixel value that can be placed in the surface (e.g., using Tux Paint's Magic tool API helper function "<code>putpixel()</code>"). (Example: "<code>putpixel(surf, x, y, SDL_MapRGB(surf->format, r, g, b));</code>".)
|
||||
<li><b>SDL_FreeSurface():</b> An libSDL function that frees (deallocates) memory allocated for an SDL surface ("<code>SDL_Surface *</code>"). (See also the "<code>SDL_FreeSurface(3)</code>" <i>man page</i>)
|
||||
<li><b>SDL_GetRGB():</b> A libSDL function that, given a <code>Uint32</code> pixel value (e.g., one returned from the Tux Paint's Magic tool API helper function "<code>getpixel()</code>"), the format of the surface the pixel was taken from, and pointers to three <code>Uint8</code> variables, will place the Red, Green and Blue (RGB) values of the pixel into the three <code>Uint8</code> variables. (Example: "<code>SDL_GetRGB(getpixel(surf, x, y), surf->format, &r, &g, &b);</code>".) (See also the "<code>SDL_GetRGB(3)</code>" <i>man page</i>)
|
||||
<li><b>SDL_MapRGB():</b> A libSDL function that, given the format of a surface and <code>Uint8</code> values representing Red, Green and Blue values for a pixel, returns a <code>Uint32</code> pixel value that can be placed in the surface (e.g., using Tux Paint's Magic tool API helper function "<code>putpixel()</code>"). (Example: "<code>putpixel(surf, x, y, SDL_MapRGB(surf->format, r, g, b));</code>".) (See also the "<code>SDL_MapRGB(3)</code>" <i>man page</i>)
|
||||
<li><b>SDL_image:</b> A library on top of libSDL that can load various kinds of image files (e.g., PNG) and return them as an "<code>SDL_Surface *</code>".
|
||||
<li><b>SDL_mixer:</b> 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).
|
||||
<li><b>SDL_Rect:</b> 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).
|
||||
<li><b>SDL_Surface *:</b> (A pointer to) a C structure defined by libSDL that contains a drawing surface.
|
||||
<li><b>SDL_Rect:</b> 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). (See also the "<code>SDL_Rect(3)</code>" <i>man page</i>)
|
||||
<li><b>SDL_Surface *:</b> (A pointer to) a C structure defined by libSDL that contains a drawing surface. (See also the "<code>SDL_Surface(3)</code>" <i>man page</i>)
|
||||
<li><b>Shared Object:</b> A piece of code that's compiled separately from the main application, and loaded dynamically, at runtime.
|
||||
<li><b>Simple DirectMedia Layer:</b> A programming library that allows programs portable low level access to a video framebuffer, audio output, mouse, and keyboard.
|
||||
<li><b>snprintf():</b> <i>TBD</i>
|
||||
<li><b>Simple DirectMedia Layer:</b> A programming library that allows programs portable low level access to a video framebuffer, audio output, mouse, and keyboard. (See also: <a href="http://www.libsdl.org/">http://www.libsdl.org/</a>)
|
||||
<li><b>snprintf():</b> <i>TBD</i> (See also the "<code>snprintf(3)</code>" <i>man page</i>)
|
||||
<li><b>.so:</b> See "Shared Object"
|
||||
<li><b>sRBG:</b> See "RGBA"
|
||||
<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.)
|
||||
<li><b>strdup():</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.
|
||||
<li><b>strdup():</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><b>struct:</b> See "C structure"
|
||||
<li><b>The GIMP</b>: An Open Source image manipulation and paint program.
|
||||
<li><b>tp_magic_api.h:</b> A header file that defines Tux Paint's Magic tool API. Plugins must '#include' it.
|
||||
<li><b>tp-magic-config:</b> 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).
|
||||
<li><b>tp-magic-config:</b> 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). (See also the "<code>tp-magic-config(3)</code>" <i>man page</i>.)
|
||||
<li><b>Uint32:</b> A 32-bit, unsigned integer (defined by libSDL). In other words, four bytes that can represent 0 through 4294967295. (Typically used to hold enough information to store three or four bytes representing a pixel's color; i.e., RBGA value).
|
||||
<li><b>Uint8:</b> An 8-bit, unsigned integer (defined by libSDL). In other words, a byte that can represent 0 through 255.
|
||||
<li><b>unsigned:</b> <i>TBD</i>
|
||||
<li><b>value:</b> See "HSV"
|
||||
<li><b>variable:</b> <i>TBD</i>
|
||||
<li><b>WAV:</b> <i>TBD</i>
|
||||
<li><b>WAV:</b> <i>TBD</i> (See also "Ogg Vorbis")
|
||||
<li><b>(w,h):</b> See "Dimensions"
|
||||
<li><b>(x,y):</b> See "Coordinates"
|
||||
</ul>
|
||||
|
|
|
|||
120
magic/magic-docs/Makefile
Normal file
120
magic/magic-docs/Makefile
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
# Makefile for Tux Paint Magic Tool Plugin API docs
|
||||
#
|
||||
# Uses "links" to convert docs from HTML to plain text.
|
||||
# (Normally only ran by the developers after updating the HTML, prior to
|
||||
# release.)
|
||||
#
|
||||
# Bill Kendrick
|
||||
# bill@newbreedsoftware.com
|
||||
#
|
||||
# August 2, 2007 - August 2, 2007
|
||||
# $Id$
|
||||
|
||||
LINKS=links -dump -no-numbering -no-references
|
||||
|
||||
TXT_FILES= \
|
||||
blocks.txt \
|
||||
blur.txt \
|
||||
bricks.txt \
|
||||
cartoon.txt \
|
||||
chalk.txt \
|
||||
darken.txt \
|
||||
drip.txt \
|
||||
emboss.txt \
|
||||
fade.txt \
|
||||
fill.txt \
|
||||
flip.txt \
|
||||
flower.txt \
|
||||
foam.txt \
|
||||
glasstile.txt \
|
||||
grass.txt \
|
||||
kalidescope.txt \
|
||||
metalpaint.txt \
|
||||
mirror.txt \
|
||||
negative.txt \
|
||||
rainbow.txt \
|
||||
ripples.txt \
|
||||
smudge.txt \
|
||||
sparkles.txt \
|
||||
tint.txt \
|
||||
waves.txt
|
||||
|
||||
all: $(TXT_FILES)
|
||||
|
||||
clean:
|
||||
@-rm $(TXT_FILES)
|
||||
|
||||
blocks.txt: html/blocks.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
blur.txt: html/blur.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
bricks.txt: html/bricks.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
cartoon.txt: html/cartoon.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
chalk.txt: html/chalk.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
darken.txt: html/darken.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
drip.txt: html/drip.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
emboss.txt: html/emboss.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
fade.txt: html/fade.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
fill.txt: html/fill.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
flip.txt: html/flip.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
flower.txt: html/flower.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
foam.txt: html/foam.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
glasstile.txt: html/glasstile.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
grass.txt: html/grass.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
kalidescope.txt: html/kalidescope.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
metalpaint.txt: html/metalpaint.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
mirror.txt: html/mirror.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
negative.txt: html/negative.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
rainbow.txt: html/rainbow.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
ripples.txt: html/ripples.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
smudge.txt: html/smudge.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
sparkles.txt: html/sparkles.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
tint.txt: html/tint.html
|
||||
@$(LINKS) $< > $@
|
||||
|
||||
waves.txt: html/waves.html
|
||||
@$(LINKS) $< > $@
|
||||
4
magic/magic-docs/blocks.txt
Normal file
4
magic/magic-docs/blocks.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Tux Paint "Magic" Tool: Blocks
|
||||
|
||||
This makes the picture blocky looking ("pixelated") wherever you drag the
|
||||
mouse.
|
||||
5
magic/magic-docs/blur.txt
Normal file
5
magic/magic-docs/blur.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Tux Paint "Magic" Tool: Blur
|
||||
|
||||
This makes the picture fuzzy wherever you drag the mouse.
|
||||
|
||||
See also: Smudge.
|
||||
5
magic/magic-docs/bricks.txt
Normal file
5
magic/magic-docs/bricks.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Tux Paint "Magic" Tool: Bricks
|
||||
|
||||
These two tools intelligently paint large and small brick patterns on the
|
||||
canvas. The bricks can be tinted various redish hues by selecting
|
||||
different colors in the color palette.
|
||||
4
magic/magic-docs/cartoon.txt
Normal file
4
magic/magic-docs/cartoon.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Tux Paint "Magic" Tool: Cartoon
|
||||
|
||||
This makes the picture look like a cartoon -- with thick outlines and
|
||||
bright, solid colors -- wherever you move the mouse.
|
||||
4
magic/magic-docs/chalk.txt
Normal file
4
magic/magic-docs/chalk.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Tux Paint "Magic" Tool: Chalk
|
||||
|
||||
This makes parts of the picture (where you move the mouse) look like a
|
||||
chalk drawing.
|
||||
6
magic/magic-docs/darken.txt
Normal file
6
magic/magic-docs/darken.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Tux Paint "Magic" Tool: Darken
|
||||
|
||||
This dakrens the colors wherever you drag the mouse. (Do it to the same
|
||||
spot many times, and it will eventually become black.)
|
||||
|
||||
See also: Darken and Tint.
|
||||
3
magic/magic-docs/drip.txt
Normal file
3
magic/magic-docs/drip.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Tux Paint "Magic" Tool: Drip
|
||||
|
||||
This makes the paint "drip" wherever you move the mouse.
|
||||
5
magic/magic-docs/emboss.txt
Normal file
5
magic/magic-docs/emboss.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Tux Paint "Magic" Tool: Emboss
|
||||
|
||||
This makes parts of your picture look "embossed." Wherever there are sharp
|
||||
edges in your picture, the picture will look raised like it was stamped in
|
||||
metal.
|
||||
6
magic/magic-docs/fade.txt
Normal file
6
magic/magic-docs/fade.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Tux Paint "Magic" Tool: Fade
|
||||
|
||||
This fades the colors wherever you drag the mouse. (Do it to the same spot
|
||||
many times, and it will eventually become white.)
|
||||
|
||||
See also: Darken and Tint.
|
||||
4
magic/magic-docs/fill.txt
Normal file
4
magic/magic-docs/fill.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Tux Paint "Magic" Tool: Fill
|
||||
|
||||
This floods the picture with a color. It lets you quickly fill parts of
|
||||
the picture, as if it were a coloring book.
|
||||
6
magic/magic-docs/flip.txt
Normal file
6
magic/magic-docs/flip.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Tux Paint "Magic" Tool: Flip
|
||||
|
||||
Similar to "Mirror." Click and the entire image will be turned
|
||||
upside-down.
|
||||
|
||||
See also: Mirror.
|
||||
9
magic/magic-docs/flower.txt
Normal file
9
magic/magic-docs/flower.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
Tux Paint "Magic" Tool: Flower
|
||||
|
||||
This tool draws small flowers, with leafy bases and stalks. Click to set
|
||||
the base, then drag the mouse upwards to drawe the stalk, and finally
|
||||
release the mouse button to finish the flower. It will be drawn in the
|
||||
currently-selected color. The shape and length of the stalk depends on how
|
||||
you move the mouse while you drag.
|
||||
|
||||
See also: Grass.
|
||||
5
magic/magic-docs/foam.txt
Normal file
5
magic/magic-docs/foam.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Tux Paint "Magic" Tool: Foam
|
||||
|
||||
Click and drag the mouse to draw foamy bubbles. The more you drag the
|
||||
mouse in a particular spot, the more likely small bubbles will combine to
|
||||
form bigger bubbles.
|
||||
4
magic/magic-docs/glasstile.txt
Normal file
4
magic/magic-docs/glasstile.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Tux Paint "Magic" Tool: Glass Tile
|
||||
|
||||
Click and drag over your picture to make it look like it's being seen
|
||||
through glass tiles.
|
||||
7
magic/magic-docs/grass.txt
Normal file
7
magic/magic-docs/grass.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Tux Paint "Magic" Tool: Grass
|
||||
|
||||
This paints grass on the image. The higher up the canvas, the smaller the
|
||||
grass is drawn, giving an illusion of perspective. The grass can be tinted
|
||||
various greenish hues by selecting different colors in the color palette.
|
||||
|
||||
See also: Flower.
|
||||
25
magic/magic-docs/html/blocks.html
Normal file
25
magic/magic-docs/html/blocks.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Blocks
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Blocks
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
This makes the picture blocky looking ("pixelated") wherever
|
||||
you drag the mouse.
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
26
magic/magic-docs/html/blur.html
Normal file
26
magic/magic-docs/html/blur.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Blur
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Blur
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
This makes the picture fuzzy wherever you drag the mouse.
|
||||
</p>
|
||||
|
||||
<p><b>See also:</b> <a href="smudge.html">Smudge</a>.</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
26
magic/magic-docs/html/bricks.html
Normal file
26
magic/magic-docs/html/bricks.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Bricks
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Bricks
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
These two tools intelligently paint large and small brick
|
||||
patterns on the canvas. The bricks can be tinted various redish
|
||||
hues by selecting different colors in the color palette.
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
25
magic/magic-docs/html/cartoon.html
Normal file
25
magic/magic-docs/html/cartoon.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Cartoon
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Cartoon
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
This makes the picture look like a cartoon — with thick
|
||||
outlines and bright, solid colors — wherever you move the mouse.
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
25
magic/magic-docs/html/chalk.html
Normal file
25
magic/magic-docs/html/chalk.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Chalk
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Chalk
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
This makes parts of the picture (where you move the mouse)
|
||||
look like a chalk drawing.
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
30
magic/magic-docs/html/darken.html
Normal file
30
magic/magic-docs/html/darken.html
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Darken
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Darken
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
This dakrens the colors wherever you drag the mouse.
|
||||
(Do it to the same spot many times, and it will eventually become
|
||||
black.)
|
||||
</p>
|
||||
|
||||
<p><b>See also:</b> <a href="fade.html">Darken</a>
|
||||
and <a href="tint.html">Tint</a>.</p>
|
||||
|
||||
|
||||
</body></html>
|
||||
|
||||
24
magic/magic-docs/html/drip.html
Normal file
24
magic/magic-docs/html/drip.html
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Drip
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Drip
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
This makes the paint "drip" wherever you move the mouse.
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
25
magic/magic-docs/html/emboss.html
Normal file
25
magic/magic-docs/html/emboss.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Emboss
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Emboss
|
||||
|
||||
</h1>
|
||||
|
||||
<p>This makes parts of your picture look "embossed." Wherever there are
|
||||
sharp edges in your picture, the picture will look raised like it was
|
||||
stamped in metal.
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
30
magic/magic-docs/html/fade.html
Normal file
30
magic/magic-docs/html/fade.html
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Fade
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Fade
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
This fades the colors wherever you drag the mouse.
|
||||
(Do it to the same spot many times, and it will eventually become
|
||||
white.)
|
||||
</p>
|
||||
|
||||
<p><b>See also:</b> <a href="darken.html">Darken</a>
|
||||
and <a href="tint.html">Tint</a>.</p>
|
||||
|
||||
|
||||
</body></html>
|
||||
|
||||
25
magic/magic-docs/html/fill.html
Normal file
25
magic/magic-docs/html/fill.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Fill
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Fill
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
This floods the picture with a color. It lets you quickly
|
||||
fill parts of the picture, as if it were a coloring book.
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
27
magic/magic-docs/html/flip.html
Normal file
27
magic/magic-docs/html/flip.html
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Flip
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Flip
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
Similar to "Mirror." Click and the entire image will be turned
|
||||
upside-down.
|
||||
</p>
|
||||
|
||||
<p><b>See also:</b> <a href="mirror.html">Mirror</a>.</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
31
magic/magic-docs/html/flower.html
Normal file
31
magic/magic-docs/html/flower.html
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Flower
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Flower
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
This tool draws small flowers, with leafy bases and stalks.
|
||||
Click to set the base, then drag the mouse upwards to drawe the stalk,
|
||||
and finally release the mouse button to finish the flower. It will be drawn
|
||||
in the currently-selected color.
|
||||
The shape and length of the stalk depends on how you move the mouse
|
||||
while you drag.
|
||||
</p>
|
||||
|
||||
<p>See also: <a href="grass.html">Grass</a>.</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
25
magic/magic-docs/html/foam.html
Normal file
25
magic/magic-docs/html/foam.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Foam
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Foam
|
||||
|
||||
</h1>
|
||||
|
||||
<p>Click and drag the mouse to draw foamy bubbles. The more you drag the
|
||||
mouse in a particular spot, the more likely small bubbles will combine to
|
||||
form bigger bubbles.
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
24
magic/magic-docs/html/glasstile.html
Normal file
24
magic/magic-docs/html/glasstile.html
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Glass Tile
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Glass Tile
|
||||
|
||||
</h1>
|
||||
|
||||
<p>Click and drag over your picture to make it look like it's being seen
|
||||
through glass tiles.
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
29
magic/magic-docs/html/grass.html
Normal file
29
magic/magic-docs/html/grass.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Grass
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Grass
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
This paints grass on the image. The higher up the canvas,
|
||||
the smaller the grass is drawn, giving an illusion of perspective.
|
||||
The grass can be tinted various greenish hues by selecting
|
||||
different colors in the color palette.
|
||||
</p>
|
||||
|
||||
<p>See also: <a href="flower.html">Flower</a>.</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
25
magic/magic-docs/html/kalidescope.html
Normal file
25
magic/magic-docs/html/kalidescope.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Kaleidoscope
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Kaleidoscope
|
||||
|
||||
</h1>
|
||||
|
||||
<p>This paint brush draws in four places at the same time, mirroring
|
||||
symmetrically, both horizontally and vertically. It uses the currently
|
||||
selected color.
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
24
magic/magic-docs/html/metalpaint.html
Normal file
24
magic/magic-docs/html/metalpaint.html
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Metal Paint
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Metal Paint
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
Click and drag to draw shiny metal using the current color.
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
28
magic/magic-docs/html/mirror.html
Normal file
28
magic/magic-docs/html/mirror.html
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Mirror
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Mirror
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
When you click the mouse in your picture with the "Mirror"
|
||||
magic effect selected, the entire image will be reversed,
|
||||
turning it into a mirror image.
|
||||
</p>
|
||||
|
||||
<p><b>See also:</b> <a href="flip.html">Flip</a>.</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
25
magic/magic-docs/html/negative.html
Normal file
25
magic/magic-docs/html/negative.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Negative
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Negagtive
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
This inverts the colors wherever you drag the mouse.
|
||||
(e.g., white becomes black, and vice versa.)
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
25
magic/magic-docs/html/rainbow.html
Normal file
25
magic/magic-docs/html/rainbow.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Rainbow
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Rainbow
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
This is similar to the paint brush, but as you move the mouse
|
||||
around, it cycles through a spectrum of bright colors.
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
24
magic/magic-docs/html/ripples.html
Normal file
24
magic/magic-docs/html/ripples.html
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Ripples
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Ripples
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
Click in your picture to make water ripple distortions appear over it.
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
27
magic/magic-docs/html/smudge.html
Normal file
27
magic/magic-docs/html/smudge.html
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Smudge
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Smudge
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
This pushes the colors around under the mouse, like finger painting
|
||||
with wet paint.
|
||||
</p>
|
||||
|
||||
<p><b>See also:</b> <a href="blur.html">Blur</a>.</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
25
magic/magic-docs/html/sparkles.html
Normal file
25
magic/magic-docs/html/sparkles.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Sparkles
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Sparkles
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
This draws glowing sparkles on the canvas, in the currently-selected
|
||||
color.
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
28
magic/magic-docs/html/tint.html
Normal file
28
magic/magic-docs/html/tint.html
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Tint
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Tint
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
This changes the color (or hue) of the parts of the picture to
|
||||
the selected color.
|
||||
</p>
|
||||
|
||||
<p><b>See also:</b> <a href="fade.html">Fade</a>
|
||||
and <a href="darken.html">Darken</a>.</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
26
magic/magic-docs/html/waves.html
Normal file
26
magic/magic-docs/html/waves.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<body><html><head><title>Tux Paint "Magic" Tool:
|
||||
|
||||
Waves
|
||||
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF0000"
|
||||
alink="#FF00FF">
|
||||
|
||||
<h1 align=center">Tux Paint "Magic" Tool:
|
||||
|
||||
Waves
|
||||
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
Click to make the entire picture wavy. Drag the mouse up and down to
|
||||
change the height of the ripples, and left and right to change the width.
|
||||
Release the mouse button when it looks the way you like it.
|
||||
</p>
|
||||
|
||||
</body></html>
|
||||
|
||||
5
magic/magic-docs/kalidescope.txt
Normal file
5
magic/magic-docs/kalidescope.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Tux Paint "Magic" Tool: Kaleidoscope
|
||||
|
||||
This paint brush draws in four places at the same time, mirroring
|
||||
symmetrically, both horizontally and vertically. It uses the currently
|
||||
selected color.
|
||||
3
magic/magic-docs/metalpaint.txt
Normal file
3
magic/magic-docs/metalpaint.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Tux Paint "Magic" Tool: Metal Paint
|
||||
|
||||
Click and drag to draw shiny metal using the current color.
|
||||
7
magic/magic-docs/mirror.txt
Normal file
7
magic/magic-docs/mirror.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Tux Paint "Magic" Tool: Mirror
|
||||
|
||||
When you click the mouse in your picture with the "Mirror" magic effect
|
||||
selected, the entire image will be reversed, turning it into a mirror
|
||||
image.
|
||||
|
||||
See also: Flip.
|
||||
4
magic/magic-docs/negative.txt
Normal file
4
magic/magic-docs/negative.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Tux Paint "Magic" Tool: Negagtive
|
||||
|
||||
This inverts the colors wherever you drag the mouse. (e.g., white becomes
|
||||
black, and vice versa.)
|
||||
4
magic/magic-docs/rainbow.txt
Normal file
4
magic/magic-docs/rainbow.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Tux Paint "Magic" Tool: Rainbow
|
||||
|
||||
This is similar to the paint brush, but as you move the mouse around, it
|
||||
cycles through a spectrum of bright colors.
|
||||
3
magic/magic-docs/ripples.txt
Normal file
3
magic/magic-docs/ripples.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Tux Paint "Magic" Tool: Ripples
|
||||
|
||||
Click in your picture to make water ripple distortions appear over it.
|
||||
6
magic/magic-docs/smudge.txt
Normal file
6
magic/magic-docs/smudge.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Tux Paint "Magic" Tool: Smudge
|
||||
|
||||
This pushes the colors around under the mouse, like finger painting with
|
||||
wet paint.
|
||||
|
||||
See also: Blur.
|
||||
4
magic/magic-docs/sparkles.txt
Normal file
4
magic/magic-docs/sparkles.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Tux Paint "Magic" Tool: Sparkles
|
||||
|
||||
This draws glowing sparkles on the canvas, in the currently-selected
|
||||
color.
|
||||
6
magic/magic-docs/tint.txt
Normal file
6
magic/magic-docs/tint.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Tux Paint "Magic" Tool: Tint
|
||||
|
||||
This changes the color (or hue) of the parts of the picture to the
|
||||
selected color.
|
||||
|
||||
See also: Fade and Darken.
|
||||
5
magic/magic-docs/waves.txt
Normal file
5
magic/magic-docs/waves.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Tux Paint "Magic" Tool: Waves
|
||||
|
||||
Click to make the entire picture wavy. Drag the mouse up and down to
|
||||
change the height of the ripples, and left and right to change the width.
|
||||
Release the mouse button when it looks the way you like it.
|
||||
|
|
@ -663,11 +663,12 @@ int load_user_fonts(SDL_Surface * screen, void *vp)
|
|||
#endif
|
||||
}
|
||||
|
||||
homedirdir = get_fname("fonts");
|
||||
homedirdir = get_fname("fonts", DIR_DATA);
|
||||
loadfonts(screen, homedirdir);
|
||||
free(homedirdir);
|
||||
|
||||
#ifdef WIN32
|
||||
homedirdir = get_fname("data/fonts");
|
||||
homedirdir = get_fname("data/fonts", DIR_DATA);
|
||||
loadfonts(screen, homedirdir);
|
||||
free(homedirdir);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -10,89 +10,71 @@
|
|||
#include "debug.h"
|
||||
|
||||
char *savedir;
|
||||
char *datadir;
|
||||
|
||||
|
||||
/* The filename for the current image: */
|
||||
|
||||
char *get_fname(const char *const name)
|
||||
char *get_fname(const char *const name, int kind)
|
||||
{
|
||||
char f[512];
|
||||
const char *tux_settings_dir;
|
||||
char * dir;
|
||||
|
||||
|
||||
/* Where is the user's data directory?
|
||||
This is where their saved files are stored,
|
||||
local fonts, brushes and stamps can be found,
|
||||
and where the "current_id.txt" file is saved */
|
||||
/* DIR_SAVE: Where is the user's saved directory?
|
||||
This is where their saved files are stored
|
||||
and where the "current_id.txt" file is saved.
|
||||
|
||||
Windows predefines "savedir" as:
|
||||
"C:\Documents and Settings\%USERNAME%\Application Data\TuxPaint"
|
||||
though it may get overridden with "--savedir" option
|
||||
|
||||
BeOS similarly predefines "savedir" as "./userdata"...
|
||||
|
||||
Macintosh: It's under ~/Library/Application Support/TuxPaint
|
||||
|
||||
Linux & Unix: It's under ~/.tuxpaint
|
||||
|
||||
DIR_DATA: Where is the user's data directory?
|
||||
This is where local fonts, brushes and stamps can be found. */
|
||||
|
||||
if (kind == DIR_SAVE)
|
||||
dir = savedir;
|
||||
else if (kind == DIR_DATA)
|
||||
dir = datadir;
|
||||
else
|
||||
return NULL;
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
/* Windows predefines "savedir" as:
|
||||
"C:\Documents and Settings\%USERNAME%\Application Data\TuxPaint"
|
||||
though it may get overridden with "--savedir" option */
|
||||
|
||||
snprintf(f, sizeof(f), "%s/%s", savedir, name);
|
||||
|
||||
snprintf(f, sizeof(f), "%s/%s", dir, name);
|
||||
#elif __BEOS__
|
||||
/* BeOS similarly predefines "savedir" as "./userdata"... */
|
||||
|
||||
if (*name == '\0')
|
||||
strcpy(f, savedir);
|
||||
strcpy(f, dir);
|
||||
else
|
||||
snprintf(f, sizeof(f), "%s/%s", savedir, name);
|
||||
|
||||
#elif __APPLE__
|
||||
/* Macintosh: It's under ~/Library/Application Support/TuxPaint */
|
||||
|
||||
tux_settings_dir = "Library/Application Support/TuxPaint";
|
||||
#else
|
||||
/* Linux & Unix: It's under ~/.tuxpaint */
|
||||
|
||||
tux_settings_dir = ".tuxpaint";
|
||||
snprintf(f, sizeof(f), "%s/%s", dir, name);
|
||||
#endif
|
||||
|
||||
|
||||
/* Put together home directory path + settings directory + filename... */
|
||||
|
||||
if (savedir == NULL)
|
||||
if (dir == NULL)
|
||||
{
|
||||
/* Save directory not overridden: */
|
||||
fprintf(stderr, "Warning: get_fname() has a NULL dir...!?\n");
|
||||
return strdup(name);;
|
||||
}
|
||||
|
||||
if (getenv("HOME") != NULL)
|
||||
{
|
||||
if (*name == '\0')
|
||||
{
|
||||
/* (Some mkdir()'s don't like trailing slashes) */
|
||||
if (*name != '\0')
|
||||
{
|
||||
/* (Some mkdir()'s don't like trailing slashes) */
|
||||
|
||||
snprintf(f, sizeof(f), "%s/%s", getenv("HOME"), tux_settings_dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(f, sizeof(f), "%s/%s/%s",
|
||||
getenv("HOME"), tux_settings_dir, name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* WOAH! Don't know where HOME directory is! Last resort, use '.'! */
|
||||
|
||||
strcpy(f, name);
|
||||
}
|
||||
snprintf(f, sizeof(f), "%s/%s", dir, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* User had overridden save directory with "--savedir" option: */
|
||||
|
||||
if (*name != '\0')
|
||||
{
|
||||
/* (Some mkdir()'s don't like trailing slashes) */
|
||||
|
||||
snprintf(f, sizeof(f), "%s/%s", savedir, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(f, sizeof(f), "%s", savedir);
|
||||
}
|
||||
snprintf(f, sizeof(f), "%s", dir);
|
||||
}
|
||||
|
||||
return strdup(f);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,14 @@
|
|||
#define GET_FNAME_H
|
||||
|
||||
extern char *savedir;
|
||||
extern char *datadir;
|
||||
|
||||
char *get_fname(const char *const name);
|
||||
enum {
|
||||
DIR_SAVE,
|
||||
DIR_DATA
|
||||
};
|
||||
|
||||
char *get_fname(const char *const name, int kind);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,86 +0,0 @@
|
|||
.\" tp-magic-config - 2007.07.31
|
||||
.TH TP-MAGIC-CONFIG 3 "31 Jul 2007" "2007.07.31" "Tux Paint Import"
|
||||
.SH NAME
|
||||
tp-magic-config -- Helps creating 'Magic' tool plugins for Tux Paint(1)
|
||||
|
||||
.SH SYNOPSYS
|
||||
.TP 16
|
||||
.B tp-magic-config [\-\-apiversion | \-\-version | \-\-cflags | \-\-pluginprefix | \-\-dataprefix]
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fItp-magic-config\fP is a simple shell script that responds with various
|
||||
pieces of information about the currently-installed version of
|
||||
\fITux Paint\fP(1) that are useful when building 'Magic' tool plugins.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP 8
|
||||
.B \-\-apiversion
|
||||
Outputs the version of the \fITux Paint\fP 'Magic' tool plugin API that the
|
||||
installed copy of \fITux Paint\fP supports. (For API compatibility testing.)
|
||||
.TP 8
|
||||
.B \-\-version
|
||||
Outputs the version of \fITux Paint\fP that \fItp-magic-config\fP
|
||||
corresponds to.
|
||||
.TP 8
|
||||
.B \-\-cflags
|
||||
Outputs the compiler flags that \fITux Paint\fP 'Magic' tool plugins should
|
||||
be compiled with. (For example, a "\-I" include path option that tells the
|
||||
compiler where it can find the plugin API header file, "tp_magic_config.h",
|
||||
that plugins must #include.)
|
||||
.TP 8
|
||||
.B \-\-pluginprefix
|
||||
Outputs the directory where the installed copy of \fITux Paint\fP expects
|
||||
to find 'Magic' tool plugins (".so" shared objects).
|
||||
.TP 8
|
||||
.B \-\-dataprefix
|
||||
Outputs the directory where the installed copy of \fITux Paint\fP keeps its
|
||||
global data files (e.g., "/usr/share/tuxpaint/"). This is the same value that
|
||||
plugins will receive in the "data_directory" string within the
|
||||
"magic_api" structure sent to the plugins' functions.
|
||||
|
||||
.SH SHELL EXAMPLES
|
||||
gcc -shared `tp-magic-config --cflags` my_plugin.c -o my_plugin.so
|
||||
.PP
|
||||
sudo cp my_plugin.so `tp-magic-config \-\-pluginprefix`
|
||||
.PP
|
||||
sudo cp my_plugin_icon.png `tp-magic-config \-\-dataprefix`/images/magic/
|
||||
|
||||
.SH MAKEFILE EXAMPLE
|
||||
MAGIC_CFLAGS=$(shell tp-magic-config --cflags)
|
||||
.br
|
||||
MAGIC_PREFIX=$(shell tp-magic-config --pluginprefix)
|
||||
.br
|
||||
DATA_PREFIX=$(shell tp-magic-config --dataprefix)
|
||||
.PP
|
||||
all: my_plugin.so
|
||||
.PP
|
||||
my_plugin.so: my_plugin.c
|
||||
.PP $(CC) -shared $(MAGIC_CFLAGS) my_plugin.c -o my_plugin.so
|
||||
.PP
|
||||
install: install-so install-data
|
||||
.PP
|
||||
install-so:
|
||||
.br
|
||||
mkdir -p $(MAGIC_PREFIX)
|
||||
.br
|
||||
cp my_plugin.so $(MAGIC_PREFIX)/
|
||||
.br
|
||||
chmod 644 $(MAGIC_PREFIX)/my_plugin.so
|
||||
.PP
|
||||
install-data:
|
||||
.br
|
||||
mkdir -p $(DATA_PREFIX)
|
||||
.br
|
||||
cp icons/my_plugin_icon.png $(DATA_PREFIX)/images/magic/
|
||||
.br
|
||||
chmod 644 $(DATA_PREFIX)/images/magic/my_plugin_icon.png
|
||||
|
||||
.SH AUTHOR
|
||||
Bill Kendrick. <bill@newbreedsoftware.com>
|
||||
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR tuxpaint (1),
|
||||
.PP
|
||||
And documentation within /usr/[local/]share/doc/tuxpaint/.
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
.\" tuxpaint.1 - 2007.07.24
|
||||
.TH TUXPAINT 1 "24 July 2007" "0.9.18" "Tux Paint"
|
||||
.\" tuxpaint.1 - 2007.08.02
|
||||
.TH TUXPAINT 1 "2 August 2007" "0.9.18" "Tux Paint"
|
||||
.SH NAME
|
||||
tuxpaint -- A drawing program for young children.
|
||||
tuxpaint -- "Tux Paint", a drawing program for young children.
|
||||
|
||||
.SH SYNOPSYS
|
||||
.B tuxpaint
|
||||
|
|
@ -10,62 +10,127 @@ tuxpaint -- A drawing program for young children.
|
|||
.TP 9
|
||||
.B tuxpaint
|
||||
[\-\-fullscreen]
|
||||
[\-\-native]
|
||||
.br
|
||||
[\-\-WIDTHxHEIGHT]
|
||||
.br
|
||||
[\-\-native]
|
||||
.br
|
||||
[\-\-orient=portrait]
|
||||
.br
|
||||
[\-\-startblank]
|
||||
.br
|
||||
[\-\-nosound]
|
||||
.br
|
||||
[\-\-noquit]
|
||||
.br
|
||||
[\-\-noprint]
|
||||
.br
|
||||
[\-\-printdelay=\fISECONDS\fP]
|
||||
.br
|
||||
[\-\-printcfg]
|
||||
.br
|
||||
[\-\-altprintalways | \-\-altprintnever]
|
||||
.br
|
||||
[\-\-papersize \fIPAPERSIZE\fP | \-\-papersize help]
|
||||
.br
|
||||
[\-\-simpleshapes]
|
||||
.br
|
||||
[\-\-uppercase]
|
||||
.br
|
||||
[\-\-grab]
|
||||
.br
|
||||
[\-\-noshortcuts]
|
||||
.br
|
||||
[\-\-nowheelmouse]
|
||||
.br
|
||||
[\-\-nobuttondistinction]
|
||||
.br
|
||||
[\-\-nofancycursors]
|
||||
.br
|
||||
[\-\-hidecursor]
|
||||
.br
|
||||
[\-\-nooutlines]
|
||||
.br
|
||||
[\-\-nostamps]
|
||||
.br
|
||||
[\-\-nostampcontrols]
|
||||
.br
|
||||
[\-\-mirrorstamps]
|
||||
.br
|
||||
[\-\-keyboard]
|
||||
.br
|
||||
[\-\-nosysfonts]
|
||||
.br
|
||||
[\-\-savedir \fIDIR\fP]
|
||||
.br
|
||||
[\-\-datadir \fIDIR\fP]
|
||||
.br
|
||||
[\-\-saveover]
|
||||
.br
|
||||
[\-\-saveovernew]
|
||||
.br
|
||||
[\-\-nosave]
|
||||
.br
|
||||
[\-\-autosave]
|
||||
.br
|
||||
[\-\-colorfile \fIFILE\fP]
|
||||
|
||||
.TP 9
|
||||
.B tuxpaint (defaults)
|
||||
[\-\-windowed]
|
||||
.br
|
||||
[\-\-800x600]
|
||||
.br
|
||||
[\-\-orient=landscape]
|
||||
.br
|
||||
[\-\-startlast]
|
||||
.br
|
||||
[\-\-sound]
|
||||
.br
|
||||
[\-\-quit]
|
||||
.br
|
||||
[\-\-print]
|
||||
.br
|
||||
[\-\-printdelay=0]
|
||||
.br
|
||||
[\-\-noprintcfg]
|
||||
.br
|
||||
[\-\-altprintmod]
|
||||
.br
|
||||
[\-\-complexshapes]
|
||||
.br
|
||||
[\-\-mixedcase]
|
||||
.br
|
||||
[\-\-dontgrab]
|
||||
.br
|
||||
[\-\-shortcuts]
|
||||
.br
|
||||
[\-\-wheelmouse]
|
||||
.br
|
||||
[\-\-buttondistinction]
|
||||
.br
|
||||
[\-\-fancycursors]
|
||||
.br
|
||||
[\-\-showcursor]
|
||||
.br
|
||||
[\-\-outlines]
|
||||
.br
|
||||
[\-\-stamps]
|
||||
.br
|
||||
[\-\-stampcontrols]
|
||||
.br
|
||||
[\-\-dontmirrorstamps]
|
||||
.br
|
||||
[\-\-mouse]
|
||||
.br
|
||||
[\-\-sysfonts]
|
||||
.br
|
||||
[\-\-saveoverask]
|
||||
.br
|
||||
[\-\-save]
|
||||
.br
|
||||
[\-\-noautosave]
|
||||
.br
|
||||
|
||||
.TP 9
|
||||
.B tuxpaint
|
||||
|
|
@ -77,7 +142,9 @@ tuxpaint -- A drawing program for young children.
|
|||
|
||||
.TP 9
|
||||
.B tuxpaint
|
||||
[\-\-nosysconfig] [\-\-nolockfile]
|
||||
[\-\-nosysconfig]
|
||||
.br
|
||||
[\-\-nolockfile]
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
|
|
@ -124,7 +191,16 @@ When in fullscreen mode, use the system's default screen resolution.
|
|||
.B \-\-WIDTHxHEIGHT
|
||||
Run \fITux Paint\fP in a particularly-sized window, or at a particular
|
||||
fullscreen resolution (if \-\-native is not used). Default is 800x600.
|
||||
Minimum is 640x480. Portrait and landscape orientations are both supported.
|
||||
Minimum width is 640. Minimum height is 480. Portrait and landscape
|
||||
orientations are both supported. (Also see \-\-orient, below.)
|
||||
|
||||
.TP 8
|
||||
.B \-\-orient=landscape \-\-orient=portrait
|
||||
If \-\-orient=portraitis set, asks \fITux Paint\fP to swap the WIDTH and HEIGHT
|
||||
values it uses for windowed or fullscreen mode, without having to actually
|
||||
change the WIDTH and HEIGHT values in the configuration file or on the
|
||||
command-line. (This is useful on devices where the screen can be rotated,
|
||||
e.g. tablet PCs.)
|
||||
|
||||
.TP 8
|
||||
.B \-\-nosound \-\-sound
|
||||
|
|
@ -148,14 +224,24 @@ seconds. Default is 0 (no limitation).
|
|||
|
||||
.TP 8
|
||||
.B \-\-printcfg \-\-noprintcfg
|
||||
(Windows only.) Enable or disable loading and saving of printer settings.
|
||||
By default, \fITux Paint\fP will print to the default printer with default
|
||||
settings. Pressing \fI[ALT]\fP while pushing the \fIPrint\fP button
|
||||
will cause a Windows printer dialog to appear (as long as you're not in
|
||||
fullscreen mode.) If \-\-printcfg is used, your previous settings will
|
||||
(Windows and Mac OS X only.) Enable or disable loading and saving of
|
||||
printer settings. By default, \fITux Paint\fP will print to the default
|
||||
printer with default settings. Pressing \fI[ALT]\fP while pushing the
|
||||
\fIPrint\fP button will cause a printer dialog to appear (as long as you're
|
||||
not in fullscreen mode; see also \-\-altprintalways and \-\-altprintnever,
|
||||
below.) Unless \-\-noprintcfg is used, your previous settings will
|
||||
be loaded when \fITux Paint\fP starts up, and setting changes will be saved
|
||||
for next time.
|
||||
|
||||
.TP 8
|
||||
.B \-\-altprintmod \-\-altprintnever \-\-altprintalways
|
||||
These options control whether an system printer dialog appears when the
|
||||
user clicks the \fIPrint\fP button. By default (\-\-altprintmod), pressing
|
||||
\fI[ALT]\fP while clicking \fIPrint\fP will bring up a dialog (unless you're
|
||||
in fullscreen mode). With \-\-altprintalways, the dialog will always appear,
|
||||
even if \fI[ALT]\fP is not being held. With \-\-altprintnever, the dialog
|
||||
will never appear, even if \fI[ALT]\fP is being held.
|
||||
|
||||
.TP 8
|
||||
.B \-\-papersize \fIPAPERSIZE\fP
|
||||
(Only when PostScript printing is used \- not Windows, Mac OS X or BeOS.)
|
||||
|
|
@ -254,8 +340,12 @@ use the \fInosysfonts\fP option to disable this feature.
|
|||
|
||||
.TP 8
|
||||
.B \-\-savedir \fIDIR\fP
|
||||
Specify where \fITux Paint\fP should save files. By default, this is
|
||||
"~/.tuxpaint/saved" under Linux and Unix, and "userdata\\" under Windows.
|
||||
Specify where \fITux Paint\fP should save files.
|
||||
|
||||
.TP 8
|
||||
.B \-\-datadir \fIDIR\fP
|
||||
Specify where \fITux Paint\fP should look for personal data files
|
||||
(brushes, stamps, etc.).
|
||||
|
||||
.TP 8
|
||||
.B \-\-saveover \-\-saveovernew \-\-saveoverask
|
||||
|
|
@ -764,6 +854,7 @@ Martin Zhekov.
|
|||
.SH "SEE ALSO"
|
||||
.BR tuxpaint-import (1),
|
||||
.BR tuxpaint-config (1),
|
||||
.BR tp-magic-config (1),
|
||||
.BR xpaint (1),
|
||||
.BR gpaint (1),
|
||||
.BR gimp (1),
|
||||
|
|
|
|||
|
|
@ -26,11 +26,11 @@
|
|||
# (See COPYING.txt)
|
||||
|
||||
# Note: "__VERSION__", "__APIVERSION__", "__INCLUDE__",
|
||||
# "__PLUGINPREFIX__" and "__DATAPREFIX__" are replaced by
|
||||
# values in Tux Paint's Makefile, via 'sed', by the 'make tp-magic-config'
|
||||
# "__PLUGINPREFIX__", "__PLUGINDOCPREFIX__" and "__DATAPREFIX__" are replaced
|
||||
# by values in Tux Paint's Makefile, via 'sed', by the 'make tp-magic-config'
|
||||
# target.
|
||||
|
||||
# July 5, 2007 - July 31, 2007
|
||||
# July 5, 2007 - August 2, 2007
|
||||
|
||||
|
||||
if [ $# -ne 0 ]; then
|
||||
|
|
@ -54,7 +54,11 @@ if [ $# -ne 0 ]; then
|
|||
echo "__PLUGINPREFIX__"
|
||||
exit
|
||||
fi
|
||||
if [ $1 = "--plugindocprefix" ]; then
|
||||
echo "__PLUGINDOCPREFIX__"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Usage: tp-magic-config [--apiversion | --version | --cflags | --pluginprefix | --dataprefix]"
|
||||
echo "Usage: tp-magic-config [--apiversion | --version | --cflags | --pluginprefix | --plugindocprefix | --dataprefix]"
|
||||
|
||||
|
|
|
|||
178
src/tuxpaint.c
178
src/tuxpaint.c
|
|
@ -4874,23 +4874,32 @@ static void show_usage(FILE * f, char *prg)
|
|||
"Usage: %s {--usage | --help | --version | --verbose-version | --copying}\n"
|
||||
"\n"
|
||||
" %s [--windowed | --fullscreen]\n"
|
||||
" %s [--WIDTHxHEIGHT | --native] [--orient=landscape | --orient=portrait]\n"
|
||||
" %s [--startblank | --startlast ]\n"
|
||||
" %s [--sound | --nosound] [--quit | --noquit]\n"
|
||||
" %s [--print | --noprint] [--complexshapes | --simpleshapes]\n"
|
||||
" %s [--WIDTHxHEIGHT | --native]\n"
|
||||
" %s [--orient=landscape | --orient=portrait]\n"
|
||||
" %s [--startblank | --startlast]\n"
|
||||
" %s [--sound | --nosound]\n"
|
||||
" %s [--quit | --noquit]\n"
|
||||
" %s [--print | --noprint]\n"
|
||||
" %s [--complexshapes | --simpleshapes]\n"
|
||||
" %s [--mixedcase | --uppercase]\n"
|
||||
" %s [--fancycursors | --nofancycursors | --hidecursor ]\n"
|
||||
" %s [--mouse | --keyboard] [--dontgrab | --grab]\n"
|
||||
" %s [--noshortcuts | --shortcuts] [--wheelmouse | --nowheelmouse]\n"
|
||||
" %s [--nobuttondistinction | --buttondistinction ]\n"
|
||||
" %s [--outlines | --nooutlines] [--stamps | --nostamps]\n"
|
||||
" %s [--fancycursors | --nofancycursors]\n"
|
||||
" %s [--hidecursor | --showcursor]\n"
|
||||
" %s [--mouse | --keyboard]\n"
|
||||
" %s [--dontgrab | --grab]\n"
|
||||
" %s [--noshortcuts | --shortcuts]\n"
|
||||
" %s [--wheelmouse | --nowheelmouse]\n"
|
||||
" %s [--nobuttondistinction | --buttondistinction]\n"
|
||||
" %s [--outlines | --nooutlines]\n"
|
||||
" %s [--stamps | --nostamps]\n"
|
||||
" %s [--sysfonts | --nosysfonts]\n"
|
||||
" %s [--nostampcontrols | --stampcontrols]\n"
|
||||
" %s [--mirrorstamps | --dontmirrorstamps]\n"
|
||||
" %s [--saveoverask | --saveover | --saveovernew]\n"
|
||||
" %s [--nosave | --save] [--autosave | --noautosave]\n"
|
||||
" %s [--nosave | --save]\n"
|
||||
" %s [--autosave | --noautosave]\n"
|
||||
" %s [--savedir DIRECTORY]\n"
|
||||
#ifdef WIN32
|
||||
" %s [--datadir DIRECTORY]\n"
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
" %s [--printcfg | --noprintcfg]\n"
|
||||
#endif
|
||||
" %s [--printdelay=SECONDS]\n"
|
||||
|
|
@ -4899,11 +4908,15 @@ static void show_usage(FILE * f, char *prg)
|
|||
" %s [--papersize PAPERSIZE | --papersize help]\n"
|
||||
#endif
|
||||
" %s [--lang LANGUAGE | --locale LOCALE | --lang help]\n"
|
||||
" %s [--nosysconfig] [--nolockfile]\n"
|
||||
" %s [--nosysconfig]\n"
|
||||
" %s [--nolockfile]\n"
|
||||
" %s [--colorfile FILE]\n"
|
||||
/* " %s [--record FILE | --playback FILE]\n" */
|
||||
"\n",
|
||||
prg, prg,
|
||||
blank, blank, blank, blank,
|
||||
blank, blank, blank,
|
||||
blank, blank, blank,
|
||||
blank, blank, blank,
|
||||
blank, blank, blank,
|
||||
blank, blank, blank, blank, blank, blank, blank, blank, blank,
|
||||
|
|
@ -5519,7 +5532,7 @@ static void load_stamp_dir(SDL_Surface * screen, const char *const dir)
|
|||
|
||||
static void load_stamps(SDL_Surface * screen)
|
||||
{
|
||||
char *homedirdir = get_fname("stamps");
|
||||
char *homedirdir = get_fname("stamps", DIR_DATA);
|
||||
|
||||
default_stamp_size = compute_default_scale_factor(1.0);
|
||||
|
||||
|
|
@ -5530,7 +5543,7 @@ static void load_stamps(SDL_Surface * screen)
|
|||
#endif
|
||||
#ifdef WIN32
|
||||
free(homedirdir);
|
||||
homedirdir = get_fname("data/stamps");
|
||||
homedirdir = get_fname("data/stamps", DIR_DATA);
|
||||
load_stamp_dir(screen, homedirdir);
|
||||
#endif
|
||||
|
||||
|
|
@ -5688,13 +5701,41 @@ static void setup(int argc, char *argv[])
|
|||
|
||||
|
||||
#ifdef WIN32
|
||||
savedir = GetDefaultSaveDir("TuxPaint");
|
||||
#elif __BEOS__
|
||||
savedir = strdup("./userdata");
|
||||
#else
|
||||
savedir = NULL;
|
||||
#endif
|
||||
/* Windows */
|
||||
|
||||
savedir = GetDefaultSaveDir("TuxPaint");
|
||||
datadir = GetDefaultDataDir("TuxPaint");
|
||||
#elif __BEOS__
|
||||
/* BeOS */
|
||||
|
||||
savedir = strdup("./userdata");
|
||||
datadir = strdup("./userdata");
|
||||
#else
|
||||
/* Mac OS X & Linux */
|
||||
|
||||
if (getenv("HOME") != NULL)
|
||||
{
|
||||
char tmp[MAX_PATH];
|
||||
|
||||
snprintf(tmp, MAX_PATH, "%s/%s", getenv("HOME"),
|
||||
#ifdef __APPLE__
|
||||
"Library/Application Support/TuxPaint"
|
||||
#else
|
||||
".tuxpaint"
|
||||
#endif
|
||||
);
|
||||
|
||||
savedir = strdup(tmp);
|
||||
datadir = strdup(tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Woah, don't know where $HOME is? */
|
||||
|
||||
fprintf(stderr, "Error: You have no $HOME environment variable!\n");
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Load options from global config file: */
|
||||
|
|
@ -5739,7 +5780,7 @@ static void setup(int argc, char *argv[])
|
|||
|
||||
#if defined(WIN32)
|
||||
/* Default local config file in users savedir directory on Windows */
|
||||
snprintf(str, sizeof(str), "%s/tuxpaint.cfg", savedir);
|
||||
snprintf(str, sizeof(str), "%s/tuxpaint.cfg", savedir); /* FIXME */
|
||||
#elif defined(__BEOS__)
|
||||
/* BeOS: Use a "tuxpaint.cfg" file: */
|
||||
|
||||
|
|
@ -6044,15 +6085,15 @@ static void setup(int argc, char *argv[])
|
|||
}
|
||||
else if (strcmp(argv[i], "--noprintcfg") == 0)
|
||||
{
|
||||
#ifndef WIN32
|
||||
fprintf(stderr, "Note: printcfg option only applies to Windows!\n");
|
||||
#if !defined(WIN32) && !defined(__APPLE__)
|
||||
fprintf(stderr, "Note: printcfg option only applies to Windows and Mac OS X!\n");
|
||||
#endif
|
||||
use_print_config = 0;
|
||||
}
|
||||
else if (strcmp(argv[i], "--printcfg") == 0)
|
||||
{
|
||||
#ifndef WIN32
|
||||
fprintf(stderr, "Note: printcfg option only applies to Windows!\n");
|
||||
#if !defined(WIN32) && !defined(__APPLE__)
|
||||
fprintf(stderr, "Note: printcfg option only applies to Windows and Mac OS X!\n");
|
||||
#endif
|
||||
use_print_config = 1;
|
||||
}
|
||||
|
|
@ -6126,6 +6167,26 @@ static void setup(int argc, char *argv[])
|
|||
exit(1);
|
||||
}
|
||||
}
|
||||
else if (strcmp(argv[i], "--datadir") == 0)
|
||||
{
|
||||
if (i < argc - 1)
|
||||
{
|
||||
if (datadir != NULL)
|
||||
free(datadir);
|
||||
|
||||
datadir = strdup(argv[i + 1]);
|
||||
remove_slash(datadir);
|
||||
i++;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Forgot to specify the directory name! */
|
||||
|
||||
fprintf(stderr, "%s takes an argument\n", argv[i]);
|
||||
show_usage(stderr, (char *) getfilename(argv[0]));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else if (strcmp(argv[i], "--record") == 0 ||
|
||||
strcmp(argv[i], "--playback") == 0)
|
||||
{
|
||||
|
|
@ -6251,9 +6312,9 @@ static void setup(int argc, char *argv[])
|
|||
/* Look for the lockfile... */
|
||||
|
||||
#ifndef WIN32
|
||||
lock_fname = get_fname("lockfile.dat");
|
||||
lock_fname = get_fname("lockfile.dat", DIR_SAVE);
|
||||
#else
|
||||
lock_fname = get_temp_fname("lockfile.dat");
|
||||
lock_fname = get_temp_fname("lockfile.dat", DIR_SAVE);
|
||||
#endif
|
||||
|
||||
fi = fopen(lock_fname, "r");
|
||||
|
|
@ -6289,7 +6350,7 @@ static void setup(int argc, char *argv[])
|
|||
/* Okay to run; create/update the lockfile */
|
||||
|
||||
/* (Make sure the directory exists, first!) */
|
||||
homedirdir = get_fname("");
|
||||
homedirdir = get_fname("", DIR_SAVE);
|
||||
mkdir(homedirdir, 0755);
|
||||
free(homedirdir);
|
||||
|
||||
|
|
@ -6978,11 +7039,11 @@ static void setup(int argc, char *argv[])
|
|||
|
||||
/* Load brushes: */
|
||||
load_brush_dir(screen, DATA_PREFIX "brushes");
|
||||
homedirdir = get_fname("brushes");
|
||||
homedirdir = get_fname("brushes", DIR_DATA);
|
||||
load_brush_dir(screen, homedirdir);
|
||||
#ifdef WIN32
|
||||
free(homedirdir);
|
||||
homedirdir = get_fname("data/brushes");
|
||||
homedirdir = get_fname("data/brushes", DIR_DATA);
|
||||
load_brush_dir(screen, homedirdir);
|
||||
#endif
|
||||
|
||||
|
|
@ -10401,7 +10462,7 @@ static void load_starter_id(char *saved_id)
|
|||
int r, g, b;
|
||||
|
||||
snprintf(fname, sizeof(fname), "saved/%s.dat", saved_id);
|
||||
rname = get_fname(fname);
|
||||
rname = get_fname(fname, DIR_SAVE);
|
||||
|
||||
starter_id[0] = '\0';
|
||||
|
||||
|
|
@ -10457,7 +10518,7 @@ static void load_starter(char *img_id)
|
|||
if (starter_personal == 0)
|
||||
dirname = strdup(DATA_PREFIX "starters");
|
||||
else
|
||||
dirname = get_fname("starters");
|
||||
dirname = get_fname("starters", DIR_DATA);
|
||||
|
||||
/* Clear them to NULL first: */
|
||||
img_starter = NULL;
|
||||
|
|
@ -10562,7 +10623,7 @@ static void load_current(void)
|
|||
|
||||
/* Determine the current picture's ID: */
|
||||
|
||||
fname = get_fname("current_id.txt");
|
||||
fname = get_fname("current_id.txt", DIR_SAVE);
|
||||
|
||||
fi = fopen(fname, "r");
|
||||
if (fi == NULL)
|
||||
|
|
@ -10594,7 +10655,7 @@ static void load_current(void)
|
|||
{
|
||||
snprintf(ftmp, sizeof(ftmp), "saved/%s%s", file_id, FNAME_EXTENSION);
|
||||
|
||||
fname = get_fname(ftmp);
|
||||
fname = get_fname(ftmp, DIR_SAVE);
|
||||
|
||||
tmp = IMG_Load(fname);
|
||||
|
||||
|
|
@ -10634,7 +10695,7 @@ static int make_directory(const char *path, const char *errmsg)
|
|||
char *fname;
|
||||
int res;
|
||||
|
||||
fname = get_fname(path);
|
||||
fname = get_fname(path, DIR_SAVE);
|
||||
res = mkdir(fname, 0755);
|
||||
if (res != 0 && errno != EEXIST)
|
||||
{
|
||||
|
|
@ -10662,7 +10723,7 @@ static void save_current(void)
|
|||
draw_tux_text(TUX_OOPS, strerror(errno), 0);
|
||||
}
|
||||
|
||||
fname = get_fname("current_id.txt");
|
||||
fname = get_fname("current_id.txt", DIR_SAVE);
|
||||
|
||||
fi = fopen(fname, "w");
|
||||
if (fi == NULL)
|
||||
|
|
@ -11360,9 +11421,9 @@ static void cleanup(void)
|
|||
FILE *fi;
|
||||
|
||||
#ifndef WIN32
|
||||
lock_fname = get_fname("lockfile.dat");
|
||||
lock_fname = get_fname("lockfile.dat", DIR_SAVE);
|
||||
#else
|
||||
lock_fname = get_temp_fname("lockfile.dat");
|
||||
lock_fname = get_temp_fname("lockfile.dat", DIR_SAVE);
|
||||
#endif
|
||||
|
||||
zero_time = (time_t) 0;
|
||||
|
|
@ -11802,7 +11863,7 @@ static int do_save(int tool, int dont_show_success_results)
|
|||
/* Save the file: */
|
||||
|
||||
snprintf(tmp, sizeof(tmp), "saved/%s%s", file_id, FNAME_EXTENSION);
|
||||
fname = get_fname(tmp);
|
||||
fname = get_fname(tmp, DIR_SAVE);
|
||||
debug(fname);
|
||||
|
||||
fi = fopen(fname, "wb");
|
||||
|
|
@ -11835,7 +11896,7 @@ static int do_save(int tool, int dont_show_success_results)
|
|||
/* (Was thumbnail in old directory, rather than under .thumbs?) */
|
||||
|
||||
snprintf(tmp, sizeof(tmp), "saved/%s-t%s", file_id, FNAME_EXTENSION);
|
||||
fname = get_fname(tmp);
|
||||
fname = get_fname(tmp, DIR_SAVE);
|
||||
fi = fopen(fname, "r");
|
||||
if (fi != NULL)
|
||||
{
|
||||
|
|
@ -11848,7 +11909,7 @@ static int do_save(int tool, int dont_show_success_results)
|
|||
|
||||
snprintf(tmp, sizeof(tmp), "saved/.thumbs/%s-t%s", file_id,
|
||||
FNAME_EXTENSION);
|
||||
fname = get_fname(tmp);
|
||||
fname = get_fname(tmp, DIR_SAVE);
|
||||
}
|
||||
|
||||
debug(fname);
|
||||
|
|
@ -11880,7 +11941,7 @@ static int do_save(int tool, int dont_show_success_results)
|
|||
canvas_color_b != 255)
|
||||
{
|
||||
snprintf(tmp, sizeof(tmp), "saved/%s.dat", file_id);
|
||||
fname = get_fname(tmp);
|
||||
fname = get_fname(tmp, DIR_SAVE);
|
||||
fi = fopen(fname, "w");
|
||||
if (fi != NULL)
|
||||
{
|
||||
|
|
@ -12165,7 +12226,7 @@ int do_open(void)
|
|||
{
|
||||
/* First, check for saved-images: */
|
||||
|
||||
dirname[places_to_look] = get_fname("saved");
|
||||
dirname[places_to_look] = get_fname("saved", DIR_SAVE);
|
||||
}
|
||||
else if (places_to_look == PLACE_PERSONAL_STARTERS_DIR)
|
||||
{
|
||||
|
|
@ -12926,7 +12987,7 @@ int do_open(void)
|
|||
snprintf(fname, sizeof(fname), "saved/%s%s",
|
||||
d_names[which], d_exts[which]);
|
||||
|
||||
rfname = get_fname(fname);
|
||||
rfname = get_fname(fname, DIR_SAVE);
|
||||
debug(rfname);
|
||||
|
||||
if (unlink(rfname) == 0)
|
||||
|
|
@ -12940,7 +13001,7 @@ int do_open(void)
|
|||
"saved/.thumbs/%s-t.png", d_names[which]);
|
||||
|
||||
free(rfname);
|
||||
rfname = get_fname(fname);
|
||||
rfname = get_fname(fname, DIR_SAVE);
|
||||
debug(rfname);
|
||||
|
||||
unlink(rfname);
|
||||
|
|
@ -12952,7 +13013,7 @@ int do_open(void)
|
|||
snprintf(fname, sizeof(fname), "saved/%s-t.png", d_names[which]);
|
||||
|
||||
free(rfname);
|
||||
rfname = get_fname(fname);
|
||||
rfname = get_fname(fname, DIR_SAVE);
|
||||
debug(rfname);
|
||||
|
||||
unlink(rfname);
|
||||
|
|
@ -12964,7 +13025,7 @@ int do_open(void)
|
|||
snprintf(fname, sizeof(fname), "saved/%s.dat", d_names[which]);
|
||||
|
||||
free(rfname);
|
||||
rfname = get_fname(fname);
|
||||
rfname = get_fname(fname, DIR_SAVE);
|
||||
debug(rfname);
|
||||
|
||||
unlink(rfname);
|
||||
|
|
@ -13201,7 +13262,7 @@ int do_slideshow(void)
|
|||
|
||||
/* Load list of saved-images: */
|
||||
|
||||
dirname = get_fname("saved");
|
||||
dirname = get_fname("saved", DIR_SAVE);
|
||||
|
||||
|
||||
/* Read directory of images and build thumbnails: */
|
||||
|
|
@ -14522,7 +14583,7 @@ void do_print(void)
|
|||
char f[512];
|
||||
int show = (want_alt_printcommand && !fullscreen);
|
||||
|
||||
snprintf(f, sizeof(f), "%s/%s", savedir, "print.cfg");
|
||||
snprintf(f, sizeof(f), "%s/%s", savedir, "print.cfg"); // FIXME
|
||||
|
||||
{
|
||||
const char *error =
|
||||
|
|
@ -15176,16 +15237,16 @@ static void parse_options(FILE * fi)
|
|||
}
|
||||
else if (strcmp(str, "printcfg=yes") == 0)
|
||||
{
|
||||
#ifndef WIN32
|
||||
fprintf(stderr, "Note: printcfg option only applies to Windows!\n");
|
||||
#if !defined(WIN32) && !defined(__APPLE__)
|
||||
fprintf(stderr, "Note: printcfg option only applies to Windows and Mac OS X!\n");
|
||||
#endif
|
||||
use_print_config = 1;
|
||||
}
|
||||
else if (strcmp(str, "printcfg=no") == 0 ||
|
||||
strcmp(str, "noprintcfg=yes") == 0)
|
||||
{
|
||||
#ifndef WIN32
|
||||
fprintf(stderr, "Note: printcfg option only applies to Windows!\n");
|
||||
#if !defined(WIN32) && !defined(__APPLE__)
|
||||
fprintf(stderr, "Note: printcfg option only applies to Windows and Mac OS X!\n");
|
||||
#endif
|
||||
use_print_config = 0;
|
||||
}
|
||||
|
|
@ -15248,6 +15309,15 @@ static void parse_options(FILE * fi)
|
|||
|
||||
#ifdef DEBUG
|
||||
printf("savedir set to: %s\n", savedir);
|
||||
#endif
|
||||
}
|
||||
else if (strstr(str, "datadir=") == str)
|
||||
{
|
||||
datadir = strdup(str + 8);
|
||||
remove_slash(datadir);
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("datadir set to: %s\n", datadir);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
@ -16698,7 +16768,7 @@ int do_new_dialog(void)
|
|||
{
|
||||
/* Check for coloring-book style 'starter' images in our folder: */
|
||||
|
||||
dirname[places_to_look] = get_fname("starters");
|
||||
dirname[places_to_look] = get_fname("starters", DIR_DATA);
|
||||
}
|
||||
else if (places_to_look == PLACE_STARTERS_DIR)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue