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
|
# bill@newbreedsoftware.com
|
||||||
# http://www.tuxpaint.org/
|
# http://www.tuxpaint.org/
|
||||||
|
|
||||||
# June 14, 2002 - July 31, 2007
|
# June 14, 2002 - August 2, 2007
|
||||||
|
|
||||||
|
|
||||||
# The version number, for release:
|
# The version number, for release:
|
||||||
|
|
@ -529,7 +529,7 @@ uninstall: uninstall-i18n
|
||||||
-rm $(MAN_PREFIX)/man1/tuxpaint.1.gz
|
-rm $(MAN_PREFIX)/man1/tuxpaint.1.gz
|
||||||
-rm $(MAN_PREFIX)/pl/man1/tuxpaint.1.gz
|
-rm $(MAN_PREFIX)/pl/man1/tuxpaint.1.gz
|
||||||
-rm $(MAN_PREFIX)/man1/tuxpaint-import.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 -f -r $(CONFDIR)
|
||||||
-rm -r $(MAGIC_PREFIX)
|
-rm -r $(MAGIC_PREFIX)
|
||||||
-rm -r $(INCLUDE_PREFIX)/tuxpaint
|
-rm -r $(INCLUDE_PREFIX)/tuxpaint
|
||||||
|
|
@ -743,6 +743,7 @@ install-doc:
|
||||||
@echo "...Installing documentation..."
|
@echo "...Installing documentation..."
|
||||||
@install -d $(DOC_PREFIX)
|
@install -d $(DOC_PREFIX)
|
||||||
@cp -R docs/* $(DOC_PREFIX)
|
@cp -R docs/* $(DOC_PREFIX)
|
||||||
|
@cp -R magic/magic-docs $(DOC_PREFIX)
|
||||||
@chmod a=rX,g=rX,u=rwX $(DOC_PREFIX)
|
@chmod a=rX,g=rX,u=rwX $(DOC_PREFIX)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -753,8 +754,6 @@ install-man:
|
||||||
@echo "...Installing man pages..."
|
@echo "...Installing man pages..."
|
||||||
@# man1 directory...
|
@# man1 directory...
|
||||||
@install -d $(MAN_PREFIX)/man1
|
@install -d $(MAN_PREFIX)/man1
|
||||||
@# man3 directory...
|
|
||||||
@install -d $(MAN_PREFIX)/man3
|
|
||||||
@# tuxpaint.1
|
@# tuxpaint.1
|
||||||
@cp src/manpage/tuxpaint.1 $(MAN_PREFIX)/man1
|
@cp src/manpage/tuxpaint.1 $(MAN_PREFIX)/man1
|
||||||
@gzip -f $(MAN_PREFIX)/man1/tuxpaint.1
|
@gzip -f $(MAN_PREFIX)/man1/tuxpaint.1
|
||||||
|
|
@ -769,10 +768,10 @@ install-man:
|
||||||
@cp src/manpage/tuxpaint-import.1 $(MAN_PREFIX)/man1/
|
@cp src/manpage/tuxpaint-import.1 $(MAN_PREFIX)/man1/
|
||||||
@gzip -f $(MAN_PREFIX)/man1/tuxpaint-import.1
|
@gzip -f $(MAN_PREFIX)/man1/tuxpaint-import.1
|
||||||
@chmod a+rx,g-w,o-w $(MAN_PREFIX)/man1/tuxpaint-import.1.gz
|
@chmod a+rx,g-w,o-w $(MAN_PREFIX)/man1/tuxpaint-import.1.gz
|
||||||
@# tp-magic-config.3
|
@# tp-magic-config.1
|
||||||
@cp src/manpage/tp-magic-config.3 $(MAN_PREFIX)/man3/
|
@cp src/manpage/tp-magic-config.1 $(MAN_PREFIX)/man1/
|
||||||
@gzip -f $(MAN_PREFIX)/man3/tp-magic-config.3
|
@gzip -f $(MAN_PREFIX)/man1/tp-magic-config.1
|
||||||
@chmod a+rx,g-w,o-w $(MAN_PREFIX)/man3/tp-magic-config.3.gz
|
@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=__INCLUDE__=$(INCLUDE_PREFIX)/tuxpaint= \
|
||||||
-e s=__DATAPREFIX__=$(DATA_PREFIX)= \
|
-e s=__DATAPREFIX__=$(DATA_PREFIX)= \
|
||||||
-e s=__PLUGINPREFIX__=$(MAGIC_PREFIX)= \
|
-e s=__PLUGINPREFIX__=$(MAGIC_PREFIX)= \
|
||||||
|
-e s=__PLUGINDOCPREFIX__=$(DOC_PREFIX)/magic-docs= \
|
||||||
> tp-magic-config
|
> tp-magic-config
|
||||||
|
|
||||||
# Make the "obj" directory to throw the object(s) into:
|
# 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
|
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
|
for C compiler flags (which points to where "tp_magic_api.h" header
|
||||||
file is installed) and directories Tux Paint uses (where plugin '.so'
|
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
|
* Magic plugin development docs created. On Linux/Unix, installed into
|
||||||
/usr/[local/]share/docs/tuxpaint-dev/ by default. (HTML and plaintext.)
|
/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).
|
affected (until mouse button is released and clicked again).
|
||||||
Improves performance, especially where heavy math is used.
|
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,
|
* Began adding support for using SDL_Pango, a wrapper to Pango,
|
||||||
a library for layout and rendering of text, with an emphasis on
|
a library for layout and rendering of text, with an emphasis on
|
||||||
internationalization. (The hope is to improve support for languages
|
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.
|
* Print configuration is now saved between Tux Paint sessions on Mac OS X.
|
||||||
Martin Fuhrer <mfuhrer@users.sourceforge.net>
|
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
|
* New Brushes
|
||||||
-----------
|
-----------
|
||||||
* Sparkles (based on old Magic Tool)
|
* Sparkles (based on old Magic Tool)
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
bill@newbreedsoftware.com
|
bill@newbreedsoftware.com
|
||||||
http://www.tuxpaint.org/
|
http://www.tuxpaint.org/
|
||||||
|
|
||||||
July 4, 2007
|
August 2, 2007
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -163,7 +163,7 @@ Windows Users
|
||||||
|
|
||||||
printcfg=yes
|
printcfg=yes
|
||||||
|
|
||||||
(Windows only)
|
(Windows and Mac OS X only)
|
||||||
|
|
||||||
Tux Paint will use a printer configuration file when printing.
|
Tux Paint will use a printer configuration file when printing.
|
||||||
Push the [Alt] key while clicking the 'Print' button in
|
Push the [Alt] key while clicking the 'Print' button in
|
||||||
|
|
@ -318,20 +318,72 @@ Windows Users
|
||||||
|
|
||||||
savedir=DIRECTORY
|
savedir=DIRECTORY
|
||||||
|
|
||||||
Use this option to change where Tux Paint saves pictures. By
|
Use this option to change where Tux Paint's "saved"
|
||||||
default, this is "~/.tuxpaint/saved/" under Linux and Unix, and
|
directory/folder is located, which is where Tux Paint saves and
|
||||||
"userdata\" under Windows.
|
opens pictures.
|
||||||
|
|
||||||
This can be useful in a Windows lab, where Tux Paint is
|
If you do not override it, the default location is:
|
||||||
installed on a server, and children run it from workstations.
|
|
||||||
You can set savedir to be a folder in their home directory.
|
* Linux & Unix -- Under a hidden directory named ".tuxpaint"
|
||||||
(e.g., "H:\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
|
Note: When specifying a Windows drive (e.g., "H:\"), you must
|
||||||
also specify a subdirectory.
|
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\
|
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
|
saveover=yes
|
||||||
This disables the "Save over the old version...?" prompt when
|
This disables the "Save over the old version...?" prompt when
|
||||||
saving an existing file. With this option, the older version
|
saving an existing file. With this option, the older version
|
||||||
|
|
@ -356,9 +408,8 @@ Windows Users
|
||||||
test environment.
|
test environment.
|
||||||
|
|
||||||
autosave=yes
|
autosave=yes
|
||||||
|
This prevents Tux Paint from asking whether you want to save the
|
||||||
This prevents Tux Paint from asking whether you want to save the current
|
current picture when quitting, and assumes you do.
|
||||||
picture when quitting, and assumes you do.
|
|
||||||
|
|
||||||
startblank=yes
|
startblank=yes
|
||||||
This causes Tux Paint to display a blank canvas when it first
|
This causes Tux Paint to display a blank canvas when it first
|
||||||
|
|
@ -583,6 +634,8 @@ Windows Users
|
||||||
--noprint
|
--noprint
|
||||||
--printdelay=SECONDS
|
--printdelay=SECONDS
|
||||||
--printcfg
|
--printcfg
|
||||||
|
--altprintnever
|
||||||
|
--altprintalways
|
||||||
--papersize=PAPERSIZE
|
--papersize=PAPERSIZE
|
||||||
--simpleshapes
|
--simpleshapes
|
||||||
--uppercase
|
--uppercase
|
||||||
|
|
@ -599,11 +652,13 @@ Windows Users
|
||||||
--mirrorstamps
|
--mirrorstamps
|
||||||
--keyboard
|
--keyboard
|
||||||
--savedir DIRECTORY
|
--savedir DIRECTORY
|
||||||
|
--datadir DIRECTORY
|
||||||
--saveover
|
--saveover
|
||||||
--saveovernew
|
--saveovernew
|
||||||
--nosave
|
--nosave
|
||||||
--autosave
|
--autosave
|
||||||
--lang LANGUAGE
|
--lang LANGUAGE
|
||||||
|
--colorfile FILE
|
||||||
These enable or correspond to the configuration file options
|
These enable or correspond to the configuration file options
|
||||||
described above.
|
described above.
|
||||||
|
|
||||||
|
|
@ -618,6 +673,7 @@ Windows Users
|
||||||
--print
|
--print
|
||||||
--printdelay=0
|
--printdelay=0
|
||||||
--noprintcfg
|
--noprintcfg
|
||||||
|
--altprintmod
|
||||||
--complexshapes
|
--complexshapes
|
||||||
--mixedcase
|
--mixedcase
|
||||||
--dontgrab
|
--dontgrab
|
||||||
|
|
@ -641,7 +697,7 @@ Windows Users
|
||||||
|
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
--locale locale
|
--locale LOCALE
|
||||||
|
|
||||||
Run Tux Paint in one of the support languages. See the
|
Run Tux Paint in one of the support languages. See the
|
||||||
"Choosing a Different Language" section below for the locale
|
"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
|
with the Tux Paint download, and are available separately. (See the
|
||||||
table above, under the "Choosing a Different Language" section.)
|
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,
|
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"
|
Tux Paint will try to load the font file from its system-wide "fonts"
|
||||||
directory (under a "locale" subdirectory). The name of the file
|
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
|
Under Unix and Linux, you can use the Makefile that comes with the
|
||||||
font to install the font in the appropriate location.
|
font to install the font in the appropriate location.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
120
docs/README.txt
120
docs/README.txt
|
|
@ -9,7 +9,7 @@
|
||||||
bill@newbreedsoftware.com
|
bill@newbreedsoftware.com
|
||||||
http://www.tuxpaint.org/
|
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
|
The 'Magic' tool is actually a set of special
|
||||||
tools. Select one of the "magic" effects from
|
tools. Select one of the "magic" effects from
|
||||||
the selector on the right, and then click and
|
the selector on the right. Then, depending on
|
||||||
drag around the picture to apply the effect.
|
the tool, either click and drag around the
|
||||||
|
picture, or simply click the picture once, to
|
||||||
|
apply the effect.
|
||||||
|
|
||||||
Fill
|
Each 'Magic' tool's instructions are contained
|
||||||
This floods the picture with a color.
|
within the "magic-docs" folder.
|
||||||
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.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -902,15 +811,18 @@ Doing it Manually
|
||||||
Other documentation included with Tux Paint (in the "docs"
|
Other documentation included with Tux Paint (in the "docs"
|
||||||
folder/directory) include:
|
folder/directory) include:
|
||||||
|
|
||||||
|
* "Magic" Tool Documentation ("magic-docs")
|
||||||
|
Documentation for each of the currently-installed
|
||||||
|
"Magic" tools.
|
||||||
* AUTHORS.txt
|
* AUTHORS.txt
|
||||||
List of authors and contributors
|
List of authors and contributors.
|
||||||
* CHANGES.txt
|
* CHANGES.txt
|
||||||
Summary of changed between releases
|
Summary of changed between releases.
|
||||||
* COPYING.txt
|
* COPYING.txt
|
||||||
Copying license (The GNU General Public License)
|
Copying license (The GNU General Public License).
|
||||||
* INSTALL.txt
|
* INSTALL.txt
|
||||||
Instructions for compiling/installing, when
|
Instructions for compiling/installing, when
|
||||||
applicable
|
applicable.
|
||||||
* EXTENDING.html
|
* EXTENDING.html
|
||||||
Detailed instructions on creating brushes, stamps and
|
Detailed instructions on creating brushes, stamps and
|
||||||
starters, and adding fonts, to extend Tux Paint.
|
starters, and adding fonts, to extend Tux Paint.
|
||||||
|
|
@ -920,10 +832,10 @@ Doing it Manually
|
||||||
to use Tux Paint Config.
|
to use Tux Paint Config.
|
||||||
* PNG.txt
|
* PNG.txt
|
||||||
Notes on creating PNG format bitmapped images for use
|
Notes on creating PNG format bitmapped images for use
|
||||||
in Tux Paint
|
in Tux Paint.
|
||||||
* SVG.txt
|
* SVG.txt
|
||||||
Notes on creating SVG format vector images for use in
|
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>
|
<a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a></p>
|
||||||
|
|
||||||
|
|
||||||
<p>July 4, 2007</p>
|
<p>August 2, 2007</p>
|
||||||
|
|
||||||
|
|
||||||
</center>
|
</center>
|
||||||
|
|
@ -90,7 +90,7 @@ New Breed Software</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<hr size=2 noshade><p>
|
<hr size=2 noshade>
|
||||||
|
|
||||||
<h1>Available Options</h1>
|
<h1>Available Options</h1>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
|
|
@ -215,7 +215,7 @@ New Breed Software</p>
|
||||||
|
|
||||||
<dt><code><b>printcfg=yes</b></code></dt>
|
<dt><code><b>printcfg=yes</b></code></dt>
|
||||||
<dd>
|
<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.
|
<p>Tux Paint will use a printer configuration file when printing.
|
||||||
Push the <b>[Alt]</b> key while clicking the 'Print' button in
|
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>
|
<dt><code><b>savedir=<i>DIRECTORY</i></b></code></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>Use this option to change where Tux Paint saves pictures.
|
<p>Use this option to change where Tux Paint's "<code>saved</code>"
|
||||||
By default, this is "<code>~/.tuxpaint/saved/</code>" under Linux
|
directory/folder is located, which is where Tux Paint saves and opens
|
||||||
and Unix, and "<code>userdata\</code>" under Windows.</p>
|
pictures.</p>
|
||||||
|
|
||||||
<p>This can be useful in a Windows lab, where Tux Paint is
|
<p>If you do not override it, the <b><i>default</i></b> location is:
|
||||||
installed on a server, and children run it from workstations.
|
<ul>
|
||||||
You can set <code>savedir</code> to be a folder in their home
|
<li>Linux & Unix — Under a hidden directory named
|
||||||
directory. (e.g., "<code>H:\tuxpaint\</code>")</p>
|
"<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.,
|
<p><b>Note:</b> When specifying a Windows drive (e.g.,
|
||||||
"<code>H:\</code>"), you must also specify a subdirectory.</p>
|
"<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>
|
<p><b>Example:</b> <code>savedir=Z:\tuxpaint\</code></p>
|
||||||
</dd>
|
</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>
|
<dt><code><b>saveover=yes</b></code></dt>
|
||||||
<dd>
|
<dd>
|
||||||
This disables the "<i>Save over the old version...?</i>" prompt when
|
This disables the "<i>Save over the old version...?</i>" prompt when
|
||||||
|
|
@ -445,12 +504,12 @@ New Breed Software</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt><code><b>autosave=yes</b></code></dt>
|
<dt><code><b>autosave=yes</b></code></dt>
|
||||||
<dt>
|
<dd>
|
||||||
This prevents Tux Paint from asking whether you want to save
|
This prevents Tux Paint from asking whether you want to save
|
||||||
the current picture when quitting, and assumes you do.
|
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>
|
<dd>
|
||||||
This causes Tux Paint to display a blank canvas when it first
|
This causes Tux Paint to display a blank canvas when it first
|
||||||
starts up, rather than loading the last image that was being edited.
|
starts up, rather than loading the last image that was being edited.
|
||||||
|
|
@ -916,6 +975,8 @@ New Breed Software</p>
|
||||||
--noprint<br>
|
--noprint<br>
|
||||||
--printdelay=<i>SECONDS</i><br>
|
--printdelay=<i>SECONDS</i><br>
|
||||||
--printcfg<br>
|
--printcfg<br>
|
||||||
|
--altprintnever<br>
|
||||||
|
--altprintalways<br>
|
||||||
--papersize=<i>PAPERSIZE</i><br>
|
--papersize=<i>PAPERSIZE</i><br>
|
||||||
--simpleshapes<br>
|
--simpleshapes<br>
|
||||||
--uppercase<br>
|
--uppercase<br>
|
||||||
|
|
@ -932,11 +993,13 @@ New Breed Software</p>
|
||||||
--mirrorstamps<br>
|
--mirrorstamps<br>
|
||||||
--keyboard<br>
|
--keyboard<br>
|
||||||
--savedir <i>DIRECTORY</i><br>
|
--savedir <i>DIRECTORY</i><br>
|
||||||
|
--datadir <i>DIRECTORY</i><br>
|
||||||
--saveover<br>
|
--saveover<br>
|
||||||
--saveovernew<br>
|
--saveovernew<br>
|
||||||
--nosave<br>
|
--nosave<br>
|
||||||
--autosave<br>
|
--autosave<br>
|
||||||
--lang <i>LANGUAGE</i><br>
|
--lang <i>LANGUAGE</i><br>
|
||||||
|
--colorfile <i>FILE</i><br>
|
||||||
</b></code></dt>
|
</b></code></dt>
|
||||||
<dd>
|
<dd>
|
||||||
These enable or correspond to the configuration file options
|
These enable or correspond to the configuration file options
|
||||||
|
|
@ -954,6 +1017,7 @@ New Breed Software</p>
|
||||||
--print<br>
|
--print<br>
|
||||||
--printdelay=0<br>
|
--printdelay=0<br>
|
||||||
--noprintcfg<br>
|
--noprintcfg<br>
|
||||||
|
--altprintmod<br>
|
||||||
--complexshapes<br>
|
--complexshapes<br>
|
||||||
--mixedcase<br>
|
--mixedcase<br>
|
||||||
--dontgrab<br>
|
--dontgrab<br>
|
||||||
|
|
@ -980,7 +1044,7 @@ New Breed Software</p>
|
||||||
</dd>
|
</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>
|
<dd>
|
||||||
<p>Run Tux Paint in one of the support languages.
|
<p>Run Tux Paint in one of the support languages.
|
||||||
See the "<i><a href="#different_language">Choosing a Different
|
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>
|
<h3><a name="special_fonts">Special Fonts</a></h3>
|
||||||
<blockquote>
|
<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
|
files (which are in TrueType format (TTF)), are much too large to
|
||||||
include with the Tux Paint download, and are available
|
include with the Tux Paint download, and are available
|
||||||
separately. (See the table above, under the
|
separately. (See the table above, under the
|
||||||
"<a href="#different_language"><i>Choosing a Different Language</i></a>"
|
"<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
|
Tux Paint will try to load the font file from its system-wide
|
||||||
"<code><b>fonts</b></code>" directory (under a
|
"<code><b>fonts</b></code>" directory (under a
|
||||||
"<code><b>locale</b></code>" subdirectory). The name of the file
|
"<code><b>locale</b></code>" subdirectory). The name of the file
|
||||||
corresponds to the first two letters in the 'locale' code of the
|
corresponds to the first two letters in the 'locale' code of the
|
||||||
language (e.g., "ko" for Korean, "ja" for Japanese,
|
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>"),
|
(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>
|
<blockquote>
|
||||||
<code>/usr/share/tuxpaint/fonts/locale/<b>ko.ttf</b></code>
|
<p><code>/usr/share/tuxpaint/fonts/locale/<b>ko.ttf</b></code></p>
|
||||||
</blockquote><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,
|
website,
|
||||||
<a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a>.
|
<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
|
<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>
|
with the font to install the font in the appropriate location.</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
|
<hr noshade>
|
||||||
|
|
||||||
</body></html>
|
</body></html>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ New Breed Software</p>
|
||||||
|
|
||||||
<p>June 14, 2002 -
|
<p>June 14, 2002 -
|
||||||
|
|
||||||
June 27, 2007</p>
|
August 2, 2007</p>
|
||||||
|
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
|
|
@ -456,118 +456,14 @@ New Breed Software</p>
|
||||||
<img src="images/tool_magic.png" width=48 height=48 alt="" align=right>
|
<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
|
<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
|
the "magic" effects from the selector on the right. Then, depending
|
||||||
click and drag around the picture to apply the effect.</p>
|
on the tool, either click and drag around the picture, or simply
|
||||||
|
click the picture once, to apply the effect.</p>
|
||||||
|
|
||||||
<br clear=all>
|
<br clear=all>
|
||||||
|
|
||||||
<dl>
|
<p>Each 'Magic' tool's instructions are contained within the
|
||||||
<dt><b>Fill</b></dt>
|
"<a href="../magic-docs/html/">magic-docs</a>" folder.</p>
|
||||||
<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>
|
|
||||||
|
|
||||||
<hr size=1>
|
<hr size=1>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
@ -1120,17 +1016,21 @@ New Breed Software</p>
|
||||||
folder/directory) include:
|
folder/directory) include:
|
||||||
|
|
||||||
<ul>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<li><a href="EXTENDING.html">EXTENDING.html</a><br>
|
||||||
Detailed instructions on creating brushes, stamps and starters,
|
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.
|
for those who don't want to use Tux Paint Config.
|
||||||
|
|
||||||
<li><a href="../PNG.txt">PNG.txt</a><br>
|
<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>
|
<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>
|
</ul>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
bill@newbreedsoftware.com
|
bill@newbreedsoftware.com
|
||||||
http://www.tuxpaint.org/
|
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
|
to build a plugin, you should use the command-line tool
|
||||||
"tp-magic-config" to get the appropriate compiler flags (such as where
|
"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
|
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
|
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
|
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
|
shared object file (".so") based on your 'Magic' tool plugin's C
|
||||||
source code.
|
source code.
|
||||||
|
|
||||||
Additionally, use the "tp-magic-config --cflags" command, supplied as
|
Use the "tp-magic-config --cflags" command, supplied as part of
|
||||||
part of Tux Paint, to provide additional command-line flags to your C
|
Tux Paint -- or in some cases, as part of a "Tux Paint 'Magic' Tool
|
||||||
compiler that will help it build your plugin.
|
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
|
Command-Line Example
|
||||||
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
|
$ gcc -shared `tp-magic-config --cflags` my_plugin.c -o
|
||||||
grave/backtick/backquote ("`"), and not an apostrophe/single-quote
|
my_plugin.so
|
||||||
("'"). 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 ...").
|
|
||||||
|
|
||||||
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 ...").
|
||||||
|
|
||||||
+----------------------------------------------------+
|
Makefile Example
|
||||||
| CFLAGS=-Wall -O2 $(shell tp-magic-config --cflags) |
|
|
||||||
| |
|
A snippet from a Makefile to compile a Tux Paint "Magic" tool plugin
|
||||||
| my_plugin.so: my_plugin.c |
|
might look like this:
|
||||||
| $(CC) -shared $(CFLAGS) -o $@ $< |
|
|
||||||
+----------------------------------------------------+
|
+------------------------------------------------------+
|
||||||
|
| 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
|
Windows
|
||||||
|
|
||||||
|
|
@ -591,54 +648,108 @@ Installing
|
||||||
|
|
||||||
Linux and other Unix-like Platforms
|
Linux and other Unix-like Platforms
|
||||||
|
|
||||||
Use the "tp-magic-config --pluginprefix" command, supplied as part of
|
Use the "tp-magic-config" command-line tool, supplied as part of
|
||||||
Tux Paint, to determine where the plugin shared object (".so") files
|
Tux Paint -- or in some cases, as part of a "Tux Paint 'Magic' Tool
|
||||||
should be installed. The value returned by this command will be the
|
Plugin Development package" -- to determine where your plugins' files
|
||||||
global location where the installed version of Tux Paint looks for
|
should go.
|
||||||
plugins (e.g., "").
|
|
||||||
|
|
||||||
As stand-alone commands, using the BASH shell, for example:
|
Shared Object
|
||||||
|
|
||||||
# cp my_plugin.so `tp-magic-config --pluginprefix`
|
Use "tp-magic-config --pluginprefix" to determine where the plugin
|
||||||
# chmod 644 `tp-magic-config --pluginprefix`/my_plugin.so
|
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 stand-alone commands, using the BASH shell, for example:
|
||||||
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
|
# cp my_plugin.so `tp-magic-config --pluginprefix`
|
||||||
"magic" subdirectories of Tux Paint's "images" and "sounds" data
|
# chmod 644 `tp-magic-config --pluginprefix`/my_plugin.so
|
||||||
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:
|
Note: See the note above regarding the "`" (grave) character.
|
||||||
|
|
||||||
# cp my_plugin_icon.png `tp-magic-config --dataprefix`/images/magic/
|
Documentation
|
||||||
# chmod 644 `tp-magic-config
|
|
||||||
--dataprefix`/images/magic/my_plugin_icon.png
|
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
|
Putting it Together in a Makefile
|
||||||
|
|
||||||
A snippet from a more generalized Makefile might look like this:
|
A snippet from a more generalized Makefile might look like this:
|
||||||
|
|
||||||
+------------------------------------------------------+
|
+------------------------------------------------------------+
|
||||||
| PLUGINPREFIX=$(shell tp-magic-config --pluginprefix) |
|
| PLUGINPREFIX=$(shell tp-magic-config --pluginprefix) |
|
||||||
| DATAPREFIX=$(shell tp-magic-config --dataprefix) |
|
| PLUGINDOCPREFIX=$(shell tp-magic-config --plugindocprefix) |
|
||||||
| |
|
| DATAPREFIX=$(shell tp-magic-config --dataprefix) |
|
||||||
| install: |
|
| |
|
||||||
| mkdir -p $(PLUGINPREFIX) |
|
| install: |
|
||||||
| cp *.so $(PLUGINPREFIX)/ |
|
| # |
|
||||||
| chmod 644 $(PLUGINPREFIX)/*.so |
|
| # Install plugin |
|
||||||
| mkdir -p $(DATAPREFIX)/images/magic |
|
| mkdir -p $(PLUGINPREFIX) |
|
||||||
| cp *.png $(DATAPREFIX)/images/magic/ |
|
| cp *.so $(PLUGINPREFIX)/ |
|
||||||
| chmod 644 $(DATAPREFIX)/images/magic/*.png |
|
| 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
|
The first three lines set up Makefile variables that contain the
|
||||||
returned by the "tp-magic-config" command-line tool.
|
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
|
Below that is an "install" target in the Makefile. (Invoked by, for
|
||||||
example, "$ sudo make install" or "# make install".)
|
example, "$ sudo make install" or "# make install".)
|
||||||
|
|
@ -648,7 +759,9 @@ Installing
|
||||||
into it, and invokes "chmod" to make sure they are readable.
|
into it, and invokes "chmod" to make sure they are readable.
|
||||||
|
|
||||||
It then does a similar series of commands to install icon files
|
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.
|
directory.
|
||||||
|
|
||||||
Windows
|
Windows
|
||||||
|
|
@ -696,7 +809,10 @@ Creating plugins with multiple effects
|
||||||
|
|
||||||
for (i = 0; i < NUM_TOOLS; i++)
|
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];
|
api->data_prefix, my_plugin_snd_filenames[i];
|
||||||
|
|
||||||
my_plugin_snds[i] = Mix_LoadWAV(fname);
|
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
|
* Similarly, do the same to free them later (such as freeing sound
|
||||||
effects during your "shutdown()").
|
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
|
* Use "which" values sent to your functions as an index into those
|
||||||
arrays (e.g., for playing the appropriate sound effect for a tool).
|
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
|
* free(): A C function that frees (deallocates) memory allocated by
|
||||||
other C functions (such as "strdup()").
|
other C functions (such as "strdup()").
|
||||||
* function: See "C function"
|
* 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
|
* grave: The "`" character; used by the BASH shell to use the output of
|
||||||
a command as the command-line arguments to another.
|
a command as the command-line arguments to another.
|
||||||
* green: See "RGBA"
|
* green: See "RGBA"
|
||||||
|
|
@ -807,6 +930,8 @@ Glossary
|
||||||
* macro: TBD
|
* macro: TBD
|
||||||
* magic_api: A C structure that is passed along to a plugin's functions
|
* 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.
|
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,
|
* Magic tool: One of a number of effects or drawing tools in Tux Paint,
|
||||||
made available via the "Magic" tool button.
|
made available via the "Magic" tool button.
|
||||||
* Mix_Chunk *: (A pointer to) a C structure defined by SDL_mixer that
|
* 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,
|
* Mix_LoadWAV(): An SDL_mixer function that loads a sound file (WAV,
|
||||||
Ogg Vorbis, etc.) and returns it as a "Mix_Chunk *".
|
Ogg Vorbis, etc.) and returns it as a "Mix_Chunk *".
|
||||||
* namespace: TBD
|
* namespace: TBD
|
||||||
* Ogg Vorbis: TBD
|
* OGG: See "Ogg Vorbis"
|
||||||
|
* Ogg Vorbis: TBD (See also: "WAV")
|
||||||
* Plugin: TBD
|
* Plugin: TBD
|
||||||
* PNG: TBD
|
* PNG: TBD (See also the "png(5) man page)
|
||||||
* pointer: See "C pointer"
|
* pointer: See "C pointer"
|
||||||
* red: See "RGBA"
|
* red: See "RGBA"
|
||||||
* release: The action of releasing a button on a mouse.
|
* release: The action of releasing a button on a mouse.
|
||||||
|
|
@ -827,19 +953,21 @@ Glossary
|
||||||
* saturation: See "HSV"
|
* saturation: See "HSV"
|
||||||
* SDL: See "Simple DirectMedia Layer"
|
* SDL: See "Simple DirectMedia Layer"
|
||||||
* SDL_FreeSurface(): An libSDL function that frees (deallocates) memory
|
* 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
|
* SDL_GetRGB(): A libSDL function that, given a Uint32 pixel value
|
||||||
(e.g., one returned from the Tux Paint's Magic tool API helper
|
(e.g., one returned from the Tux Paint's Magic tool API helper
|
||||||
function "getpixel()"), the format of the surface the pixel was taken
|
function "getpixel()"), the format of the surface the pixel was taken
|
||||||
from, and pointers to three Uint8 variables, will place the Red, Green
|
from, and pointers to three Uint8 variables, will place the Red, Green
|
||||||
and Blue (RGB) values of the pixel into the three Uint8 variables.
|
and Blue (RGB) values of the pixel into the three Uint8 variables.
|
||||||
(Example: "SDL_GetRGB(getpixel(surf, x, y), surf->format, &r, &g,
|
(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
|
* SDL_MapRGB(): A libSDL function that, given the format of a surface
|
||||||
and Uint8 values representing Red, Green and Blue values for a pixel,
|
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.,
|
returns a Uint32 pixel value that can be placed in the surface (e.g.,
|
||||||
using Tux Paint's Magic tool API helper function "putpixel()").
|
using Tux Paint's Magic tool API helper function "putpixel()").
|
||||||
(Example: "putpixel(surf, x, y, SDL_MapRGB(surf->format, r, g, b));".)
|
(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
|
* 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 *".
|
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
|
* 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
|
* SDL_Rect: A C structure defined by libSDL that represents a
|
||||||
rectangular area. It contains elements representing the coordinates of
|
rectangular area. It contains elements representing the coordinates of
|
||||||
the top left corner of the rectange (x,y) and the dimensions of the
|
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
|
* 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
|
* Shared Object: A piece of code that's compiled separately from the
|
||||||
main application, and loaded dynamically, at runtime.
|
main application, and loaded dynamically, at runtime.
|
||||||
* Simple DirectMedia Layer: A programming library that allows programs
|
* Simple DirectMedia Layer: A programming library that allows programs
|
||||||
portable low level access to a video framebuffer, audio output, mouse,
|
portable low level access to a video framebuffer, audio output, mouse,
|
||||||
and keyboard.
|
and keyboard. (See also: http://www.libsdl.org/)
|
||||||
* snprintf(): TBD
|
* snprintf(): TBD (See also the "snprintf(3)" man page)
|
||||||
* .so: See "Shared Object"
|
* .so: See "Shared Object"
|
||||||
* sRBG: See "RGBA"
|
* sRBG: See "RGBA"
|
||||||
* star: "*". A symbol in C that, when used in the declaration of
|
* star: "*". A symbol in C that, when used in the declaration of
|
||||||
|
|
@ -869,7 +997,7 @@ Glossary
|
||||||
integer that's being pointed to.)
|
integer that's being pointed to.)
|
||||||
* strdup(): A C function that allocates enough memory to store a copy of
|
* 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
|
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"
|
* struct: See "C structure"
|
||||||
* The GIMP: An Open Source image manipulation and paint program.
|
* 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.
|
* 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
|
* tp-magic-config: A command-line program that provides information
|
||||||
about the installed version of Tux Paint to plugin developers (such as
|
about the installed version of Tux Paint to plugin developers (such as
|
||||||
what C compiler flags they should compile with, and where plugin
|
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
|
* Uint32: A 32-bit, unsigned integer (defined by libSDL). In other
|
||||||
words, four bytes that can represent 0 through 4294967295. (Typically
|
words, four bytes that can represent 0 through 4294967295. (Typically
|
||||||
used to hold enough information to store three or four bytes
|
used to hold enough information to store three or four bytes
|
||||||
|
|
@ -887,6 +1016,6 @@ Glossary
|
||||||
* unsigned: TBD
|
* unsigned: TBD
|
||||||
* value: See "HSV"
|
* value: See "HSV"
|
||||||
* variable: TBD
|
* variable: TBD
|
||||||
* WAV: TBD
|
* WAV: TBD (See also "Ogg Vorbis")
|
||||||
* (w,h): See "Dimensions"
|
* (w,h): See "Dimensions"
|
||||||
* (x,y): See "Coordinates"
|
* (x,y): See "Coordinates"
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ New Breed Software</p>
|
||||||
<p><a href="mailto:bill@newbreedsoftware.com">bill@newbreedsoftware.com</a><br>
|
<p><a href="mailto:bill@newbreedsoftware.com">bill@newbreedsoftware.com</a><br>
|
||||||
<a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a></p>
|
<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>
|
</center>
|
||||||
|
|
||||||
<hr size=2 noshade>
|
<hr size=2 noshade>
|
||||||
|
|
@ -79,7 +79,7 @@ concept.)</p>
|
||||||
<li><a href="#multiple">Creating plugins with multiple effects</a>
|
<li><a href="#multiple">Creating plugins with multiple effects</a>
|
||||||
<li><a href="#">Example Code</a>
|
<li><a href="#">Example Code</a>
|
||||||
<li><a href="#">Getting Help</a>
|
<li><a href="#">Getting Help</a>
|
||||||
<li><a href="#">Glossary</a>
|
<li><a href="#glossary">Glossary</a>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -126,7 +126,8 @@ invokes them.</p>
|
||||||
Also, when you run the C compiler to build a plugin, you should use the
|
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
|
command-line tool "<code>tp-magic-config</code>" to get the appropriate
|
||||||
compiler flags (such as where the compiler can find the Tux Paint
|
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
|
<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
|
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
|
a shared object file ("<code>.so</code>") based on your 'Magic' tool
|
||||||
plugin's C source code.</p>
|
plugin's C source code.</p>
|
||||||
|
|
||||||
<p>Additionally, use the "<code>tp-magic-config --cflags</code>" command,
|
<p>Use the "<code>tp-magic-config --cflags</code>" command,
|
||||||
supplied as part of Tux Paint, to provide additional command-line
|
supplied as part of Tux Paint — or in some cases, as part of a
|
||||||
flags to your C compiler that will help it build your plugin.</p>
|
"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,
|
<p>As a stand-alone command, using the GNU C Compiler and BASH shell,
|
||||||
for example:</p>
|
for example:</p>
|
||||||
|
|
@ -724,7 +731,8 @@ also contains some helper macros that you may use.</p>
|
||||||
</code></p>
|
</code></p>
|
||||||
</blockquote>
|
</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
|
command are a grave/backtick/backquote
|
||||||
("<code><b><font size=+1>`</font></b></code>"), and
|
("<code><b><font size=+1>`</font></b></code>"), and
|
||||||
not an apostrophe/single-quote ("<code><b><font size=+1>'</font></b></code>").
|
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,
|
as an argument to the command being executed (in this case,
|
||||||
"<code>gcc ...</code>").</p>
|
"<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>
|
<blockquote><table border=1 cellspacing=0 cellpadding=4><tr><td>
|
||||||
<p><code>
|
<p><code>
|
||||||
CFLAGS=-Wall -O2 $(shell tp-magic-config --cflags)<br>
|
CFLAGS=-Wall -O2 $(shell tp-magic-config --cflags)<br>
|
||||||
<br>
|
<br>
|
||||||
my_plugin.so: my_plugin.c<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 $@ $<
|
$(CC) -shared $(CFLAGS) -o $@ $<
|
||||||
</code></p>
|
</code></p>
|
||||||
</td></tr></table></blockquote>
|
</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>
|
</blockquote>
|
||||||
|
|
||||||
<h3>Windows</h3>
|
<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>
|
<h3>Linux and other Unix-like Platforms</h3>
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>Use the "<code>tp-magic-config --pluginprefix</code>"
|
<p>Use the "<code>tp-magic-config</code>" command-line tool, supplied as
|
||||||
command, supplied as part of Tux Paint, to determine where the
|
part of Tux Paint — or in some cases, as part of a "Tux
|
||||||
plugin shared object ("<code>.so</code>") files should be installed.
|
Paint 'Magic' Tool Plugin Development package" — to determine
|
||||||
The value returned by this command will be the global location where
|
where your plugins' files should go.</p>
|
||||||
the installed version of Tux Paint looks for plugins
|
|
||||||
(e.g., "<code></code>").</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>
|
<p>As stand-alone commands, using the BASH shell, for example:</p>
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p><code>
|
<p><code>
|
||||||
# cp my_plugin.so `tp-magic-config --pluginprefix`<br>
|
# 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>
|
</code></p>
|
||||||
</blockquote>
|
</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
|
command, supplied as part of Tux Paint, to determine where data files
|
||||||
(PNG icon, Ogg Vorbis sound effects, etc.) should be installed.
|
(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
|
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>
|
</code></p>
|
||||||
</blockquote>
|
</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>
|
<h4>Putting it Together in a Makefile</h4>
|
||||||
|
|
||||||
<blockquote>
|
<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>
|
<blockquote><table border=1 cellspacing=0 cellpadding=4><tr><td>
|
||||||
<p><code>
|
<p><code>
|
||||||
PLUGINPREFIX=$(shell tp-magic-config --pluginprefix)<br>
|
PLUGINPREFIX=$(shell tp-magic-config --pluginprefix)<br>
|
||||||
|
PLUGINDOCPREFIX=$(shell tp-magic-config --plugindocprefix)<br>
|
||||||
DATAPREFIX=$(shell tp-magic-config --dataprefix)<br>
|
DATAPREFIX=$(shell tp-magic-config --dataprefix)<br>
|
||||||
<br>
|
<br>
|
||||||
install:<br>
|
install:<br>
|
||||||
|
#<br>
|
||||||
|
# Install plugin<br>
|
||||||
mkdir -p $(PLUGINPREFIX)<br>
|
mkdir -p $(PLUGINPREFIX)<br>
|
||||||
cp *.so $(PLUGINPREFIX)/<br>
|
cp *.so $(PLUGINPREFIX)/<br>
|
||||||
chmod 644 $(PLUGINPREFIX)/*.so<br>
|
chmod 644 $(PLUGINPREFIX)/*.so<br>
|
||||||
|
#<br>
|
||||||
|
# Install icons<br>
|
||||||
mkdir -p $(DATAPREFIX)/images/magic<br>
|
mkdir -p $(DATAPREFIX)/images/magic<br>
|
||||||
cp *.png $(DATAPREFIX)/images/magic/<br>
|
cp icons/*.png $(DATAPREFIX)/images/magic/<br>
|
||||||
chmod 644 $(DATAPREFIX)/images/magic/*.png
|
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>
|
</code></p>
|
||||||
</td></tr></table></blockquote>
|
</td></tr></table></blockquote>
|
||||||
|
|
||||||
<p>The first two lines set up Makefile variables that contain the
|
<p>The first three lines set up Makefile variables that contain the
|
||||||
paths returned by the "<code>tp-magic-config</code>" command-line tool.</p>
|
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.
|
<p>Below that is an "<code>install</code>" target in the Makefile.
|
||||||
(Invoked by, for example, "<code>$ sudo make install</code>"
|
(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>
|
"<code>chmod</code>" to make sure they are readable.</p>
|
||||||
|
|
||||||
<p>It then does a similar series of commands to install icon files
|
<p>It then does a similar series of commands to install icon files
|
||||||
("<code>.png</code>" images) into a subdirectory within Tux Paint's
|
("<code>.png</code>" images) and sound effects
|
||||||
data directory.</p>
|
("<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>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
@ -905,7 +1058,9 @@ effects:</p>
|
||||||
<br>
|
<br>
|
||||||
for (i = 0; i < NUM_TOOLS; i++)<br>
|
for (i = 0; i < NUM_TOOLS; i++)<br>
|
||||||
{<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>
|
api->data_prefix, my_plugin_snd_filenames[i];<br>
|
||||||
<br>
|
<br>
|
||||||
my_plugin_snds[i] = Mix_LoadWAV(fname);<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
|
<li>Similarly, do the same to free them later (such as freeing
|
||||||
sound effects during your "<code>shutdown()</code>").<br>
|
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
|
<li>Use "<code>which</code>" values sent to your functions as an
|
||||||
index into those arrays (e.g., for playing the appropriate sound effect
|
index into those arrays (e.g., for playing the appropriate sound effect
|
||||||
|
|
@ -960,7 +1120,7 @@ mailing lists:
|
||||||
|
|
||||||
<hr size=1 noshade>
|
<hr size=1 noshade>
|
||||||
|
|
||||||
<h2>Glossary</h2>
|
<h2><a name="glossary">Glossary</a></h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>alpha:</b> See "RGBA"
|
<li><b>alpha:</b> See "RGBA"
|
||||||
|
|
@ -999,6 +1159,8 @@ mailing lists:
|
||||||
<li><b>format:</b> <i>TBD</i>
|
<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>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>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>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>green:</b> See "RGBA"
|
||||||
<li><b>->:</b> See "arrow"
|
<li><b>->:</b> See "arrow"
|
||||||
|
|
@ -1015,14 +1177,17 @@ mailing lists:
|
||||||
<li><b>linear:</b> <i>TBD</i>
|
<li><b>linear:</b> <i>TBD</i>
|
||||||
<li><b>macro:</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>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>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_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_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>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>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>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>pointer:</b> See "C pointer"
|
||||||
<li><b>red:</b> See "RGBA"
|
<li><b>red:</b> See "RGBA"
|
||||||
<li><b>release:</b> The action of releasing a button on a mouse.
|
<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>RGB:</b> See "RBGA"
|
||||||
<li><b>saturation:</b> See "HSV"
|
<li><b>saturation:</b> See "HSV"
|
||||||
<li><b>SDL:</b> See "Simple DirectMedia Layer"
|
<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_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>".)
|
<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>".)
|
<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_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_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_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.
|
<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>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>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>
|
<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>.so:</b> See "Shared Object"
|
||||||
<li><b>sRBG:</b> See "RGBA"
|
<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>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>struct:</b> See "C structure"
|
||||||
<li><b>The GIMP</b>: An Open Source image manipulation and paint program.
|
<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_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>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>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>unsigned:</b> <i>TBD</i>
|
||||||
<li><b>value:</b> See "HSV"
|
<li><b>value:</b> See "HSV"
|
||||||
<li><b>variable:</b> <i>TBD</i>
|
<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>(w,h):</b> See "Dimensions"
|
||||||
<li><b>(x,y):</b> See "Coordinates"
|
<li><b>(x,y):</b> See "Coordinates"
|
||||||
</ul>
|
</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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
homedirdir = get_fname("fonts");
|
homedirdir = get_fname("fonts", DIR_DATA);
|
||||||
loadfonts(screen, homedirdir);
|
loadfonts(screen, homedirdir);
|
||||||
free(homedirdir);
|
free(homedirdir);
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
homedirdir = get_fname("data/fonts");
|
homedirdir = get_fname("data/fonts", DIR_DATA);
|
||||||
loadfonts(screen, homedirdir);
|
loadfonts(screen, homedirdir);
|
||||||
free(homedirdir);
|
free(homedirdir);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -10,89 +10,71 @@
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
char *savedir;
|
char *savedir;
|
||||||
|
char *datadir;
|
||||||
|
|
||||||
|
|
||||||
/* The filename for the current image: */
|
/* 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];
|
char f[512];
|
||||||
const char *tux_settings_dir;
|
char * dir;
|
||||||
|
|
||||||
|
|
||||||
/* Where is the user's data directory?
|
/* DIR_SAVE: Where is the user's saved directory?
|
||||||
This is where their saved files are stored,
|
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.
|
||||||
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
|
#ifdef WIN32
|
||||||
/* Windows predefines "savedir" as:
|
snprintf(f, sizeof(f), "%s/%s", dir, name);
|
||||||
"C:\Documents and Settings\%USERNAME%\Application Data\TuxPaint"
|
|
||||||
though it may get overridden with "--savedir" option */
|
|
||||||
|
|
||||||
snprintf(f, sizeof(f), "%s/%s", savedir, name);
|
|
||||||
|
|
||||||
#elif __BEOS__
|
#elif __BEOS__
|
||||||
/* BeOS similarly predefines "savedir" as "./userdata"... */
|
|
||||||
|
|
||||||
if (*name == '\0')
|
if (*name == '\0')
|
||||||
strcpy(f, savedir);
|
strcpy(f, dir);
|
||||||
else
|
else
|
||||||
snprintf(f, sizeof(f), "%s/%s", savedir, name);
|
snprintf(f, sizeof(f), "%s/%s", dir, 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";
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Put together home directory path + settings directory + filename... */
|
/* 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')
|
||||||
{
|
{
|
||||||
if (*name == '\0')
|
/* (Some mkdir()'s don't like trailing slashes) */
|
||||||
{
|
|
||||||
/* (Some mkdir()'s don't like trailing slashes) */
|
|
||||||
|
|
||||||
snprintf(f, sizeof(f), "%s/%s", getenv("HOME"), tux_settings_dir);
|
snprintf(f, sizeof(f), "%s/%s", dir, name);
|
||||||
}
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* User had overridden save directory with "--savedir" option: */
|
snprintf(f, sizeof(f), "%s", dir);
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return strdup(f);
|
return strdup(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,14 @@
|
||||||
#define GET_FNAME_H
|
#define GET_FNAME_H
|
||||||
|
|
||||||
extern char *savedir;
|
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
|
#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
|
.\" tuxpaint.1 - 2007.08.02
|
||||||
.TH TUXPAINT 1 "24 July 2007" "0.9.18" "Tux Paint"
|
.TH TUXPAINT 1 "2 August 2007" "0.9.18" "Tux Paint"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
tuxpaint -- A drawing program for young children.
|
tuxpaint -- "Tux Paint", a drawing program for young children.
|
||||||
|
|
||||||
.SH SYNOPSYS
|
.SH SYNOPSYS
|
||||||
.B tuxpaint
|
.B tuxpaint
|
||||||
|
|
@ -10,62 +10,127 @@ tuxpaint -- A drawing program for young children.
|
||||||
.TP 9
|
.TP 9
|
||||||
.B tuxpaint
|
.B tuxpaint
|
||||||
[\-\-fullscreen]
|
[\-\-fullscreen]
|
||||||
[\-\-native]
|
.br
|
||||||
[\-\-WIDTHxHEIGHT]
|
[\-\-WIDTHxHEIGHT]
|
||||||
|
.br
|
||||||
|
[\-\-native]
|
||||||
|
.br
|
||||||
|
[\-\-orient=portrait]
|
||||||
|
.br
|
||||||
[\-\-startblank]
|
[\-\-startblank]
|
||||||
|
.br
|
||||||
[\-\-nosound]
|
[\-\-nosound]
|
||||||
|
.br
|
||||||
[\-\-noquit]
|
[\-\-noquit]
|
||||||
|
.br
|
||||||
[\-\-noprint]
|
[\-\-noprint]
|
||||||
|
.br
|
||||||
[\-\-printdelay=\fISECONDS\fP]
|
[\-\-printdelay=\fISECONDS\fP]
|
||||||
|
.br
|
||||||
[\-\-printcfg]
|
[\-\-printcfg]
|
||||||
|
.br
|
||||||
|
[\-\-altprintalways | \-\-altprintnever]
|
||||||
|
.br
|
||||||
[\-\-papersize \fIPAPERSIZE\fP | \-\-papersize help]
|
[\-\-papersize \fIPAPERSIZE\fP | \-\-papersize help]
|
||||||
|
.br
|
||||||
[\-\-simpleshapes]
|
[\-\-simpleshapes]
|
||||||
|
.br
|
||||||
[\-\-uppercase]
|
[\-\-uppercase]
|
||||||
|
.br
|
||||||
[\-\-grab]
|
[\-\-grab]
|
||||||
|
.br
|
||||||
[\-\-noshortcuts]
|
[\-\-noshortcuts]
|
||||||
|
.br
|
||||||
[\-\-nowheelmouse]
|
[\-\-nowheelmouse]
|
||||||
|
.br
|
||||||
[\-\-nobuttondistinction]
|
[\-\-nobuttondistinction]
|
||||||
|
.br
|
||||||
[\-\-nofancycursors]
|
[\-\-nofancycursors]
|
||||||
|
.br
|
||||||
[\-\-hidecursor]
|
[\-\-hidecursor]
|
||||||
|
.br
|
||||||
[\-\-nooutlines]
|
[\-\-nooutlines]
|
||||||
|
.br
|
||||||
[\-\-nostamps]
|
[\-\-nostamps]
|
||||||
|
.br
|
||||||
[\-\-nostampcontrols]
|
[\-\-nostampcontrols]
|
||||||
|
.br
|
||||||
[\-\-mirrorstamps]
|
[\-\-mirrorstamps]
|
||||||
|
.br
|
||||||
[\-\-keyboard]
|
[\-\-keyboard]
|
||||||
|
.br
|
||||||
[\-\-nosysfonts]
|
[\-\-nosysfonts]
|
||||||
|
.br
|
||||||
[\-\-savedir \fIDIR\fP]
|
[\-\-savedir \fIDIR\fP]
|
||||||
|
.br
|
||||||
|
[\-\-datadir \fIDIR\fP]
|
||||||
|
.br
|
||||||
[\-\-saveover]
|
[\-\-saveover]
|
||||||
|
.br
|
||||||
[\-\-saveovernew]
|
[\-\-saveovernew]
|
||||||
|
.br
|
||||||
[\-\-nosave]
|
[\-\-nosave]
|
||||||
|
.br
|
||||||
[\-\-autosave]
|
[\-\-autosave]
|
||||||
|
.br
|
||||||
[\-\-colorfile \fIFILE\fP]
|
[\-\-colorfile \fIFILE\fP]
|
||||||
|
|
||||||
.TP 9
|
.TP 9
|
||||||
.B tuxpaint (defaults)
|
.B tuxpaint (defaults)
|
||||||
[\-\-windowed]
|
[\-\-windowed]
|
||||||
|
.br
|
||||||
[\-\-800x600]
|
[\-\-800x600]
|
||||||
|
.br
|
||||||
|
[\-\-orient=landscape]
|
||||||
|
.br
|
||||||
[\-\-startlast]
|
[\-\-startlast]
|
||||||
|
.br
|
||||||
[\-\-sound]
|
[\-\-sound]
|
||||||
|
.br
|
||||||
[\-\-quit]
|
[\-\-quit]
|
||||||
|
.br
|
||||||
[\-\-print]
|
[\-\-print]
|
||||||
|
.br
|
||||||
[\-\-printdelay=0]
|
[\-\-printdelay=0]
|
||||||
|
.br
|
||||||
[\-\-noprintcfg]
|
[\-\-noprintcfg]
|
||||||
|
.br
|
||||||
|
[\-\-altprintmod]
|
||||||
|
.br
|
||||||
[\-\-complexshapes]
|
[\-\-complexshapes]
|
||||||
|
.br
|
||||||
[\-\-mixedcase]
|
[\-\-mixedcase]
|
||||||
|
.br
|
||||||
[\-\-dontgrab]
|
[\-\-dontgrab]
|
||||||
|
.br
|
||||||
[\-\-shortcuts]
|
[\-\-shortcuts]
|
||||||
|
.br
|
||||||
[\-\-wheelmouse]
|
[\-\-wheelmouse]
|
||||||
|
.br
|
||||||
[\-\-buttondistinction]
|
[\-\-buttondistinction]
|
||||||
|
.br
|
||||||
[\-\-fancycursors]
|
[\-\-fancycursors]
|
||||||
|
.br
|
||||||
[\-\-showcursor]
|
[\-\-showcursor]
|
||||||
|
.br
|
||||||
[\-\-outlines]
|
[\-\-outlines]
|
||||||
|
.br
|
||||||
[\-\-stamps]
|
[\-\-stamps]
|
||||||
|
.br
|
||||||
[\-\-stampcontrols]
|
[\-\-stampcontrols]
|
||||||
|
.br
|
||||||
[\-\-dontmirrorstamps]
|
[\-\-dontmirrorstamps]
|
||||||
|
.br
|
||||||
[\-\-mouse]
|
[\-\-mouse]
|
||||||
|
.br
|
||||||
[\-\-sysfonts]
|
[\-\-sysfonts]
|
||||||
|
.br
|
||||||
[\-\-saveoverask]
|
[\-\-saveoverask]
|
||||||
|
.br
|
||||||
[\-\-save]
|
[\-\-save]
|
||||||
|
.br
|
||||||
|
[\-\-noautosave]
|
||||||
|
.br
|
||||||
|
|
||||||
.TP 9
|
.TP 9
|
||||||
.B tuxpaint
|
.B tuxpaint
|
||||||
|
|
@ -77,7 +142,9 @@ tuxpaint -- A drawing program for young children.
|
||||||
|
|
||||||
.TP 9
|
.TP 9
|
||||||
.B tuxpaint
|
.B tuxpaint
|
||||||
[\-\-nosysconfig] [\-\-nolockfile]
|
[\-\-nosysconfig]
|
||||||
|
.br
|
||||||
|
[\-\-nolockfile]
|
||||||
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.PP
|
.PP
|
||||||
|
|
@ -124,7 +191,16 @@ When in fullscreen mode, use the system's default screen resolution.
|
||||||
.B \-\-WIDTHxHEIGHT
|
.B \-\-WIDTHxHEIGHT
|
||||||
Run \fITux Paint\fP in a particularly-sized window, or at a particular
|
Run \fITux Paint\fP in a particularly-sized window, or at a particular
|
||||||
fullscreen resolution (if \-\-native is not used). Default is 800x600.
|
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
|
.TP 8
|
||||||
.B \-\-nosound \-\-sound
|
.B \-\-nosound \-\-sound
|
||||||
|
|
@ -148,14 +224,24 @@ seconds. Default is 0 (no limitation).
|
||||||
|
|
||||||
.TP 8
|
.TP 8
|
||||||
.B \-\-printcfg \-\-noprintcfg
|
.B \-\-printcfg \-\-noprintcfg
|
||||||
(Windows only.) Enable or disable loading and saving of printer settings.
|
(Windows and Mac OS X only.) Enable or disable loading and saving of
|
||||||
By default, \fITux Paint\fP will print to the default printer with default
|
printer settings. By default, \fITux Paint\fP will print to the default
|
||||||
settings. Pressing \fI[ALT]\fP while pushing the \fIPrint\fP button
|
printer with default settings. Pressing \fI[ALT]\fP while pushing the
|
||||||
will cause a Windows printer dialog to appear (as long as you're not in
|
\fIPrint\fP button will cause a printer dialog to appear (as long as you're
|
||||||
fullscreen mode.) If \-\-printcfg is used, your previous settings will
|
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
|
be loaded when \fITux Paint\fP starts up, and setting changes will be saved
|
||||||
for next time.
|
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
|
.TP 8
|
||||||
.B \-\-papersize \fIPAPERSIZE\fP
|
.B \-\-papersize \fIPAPERSIZE\fP
|
||||||
(Only when PostScript printing is used \- not Windows, Mac OS X or BeOS.)
|
(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
|
.TP 8
|
||||||
.B \-\-savedir \fIDIR\fP
|
.B \-\-savedir \fIDIR\fP
|
||||||
Specify where \fITux Paint\fP should save files. By default, this is
|
Specify where \fITux Paint\fP should save files.
|
||||||
"~/.tuxpaint/saved" under Linux and Unix, and "userdata\\" under Windows.
|
|
||||||
|
.TP 8
|
||||||
|
.B \-\-datadir \fIDIR\fP
|
||||||
|
Specify where \fITux Paint\fP should look for personal data files
|
||||||
|
(brushes, stamps, etc.).
|
||||||
|
|
||||||
.TP 8
|
.TP 8
|
||||||
.B \-\-saveover \-\-saveovernew \-\-saveoverask
|
.B \-\-saveover \-\-saveovernew \-\-saveoverask
|
||||||
|
|
@ -764,6 +854,7 @@ Martin Zhekov.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR tuxpaint-import (1),
|
.BR tuxpaint-import (1),
|
||||||
.BR tuxpaint-config (1),
|
.BR tuxpaint-config (1),
|
||||||
|
.BR tp-magic-config (1),
|
||||||
.BR xpaint (1),
|
.BR xpaint (1),
|
||||||
.BR gpaint (1),
|
.BR gpaint (1),
|
||||||
.BR gimp (1),
|
.BR gimp (1),
|
||||||
|
|
|
||||||
|
|
@ -26,11 +26,11 @@
|
||||||
# (See COPYING.txt)
|
# (See COPYING.txt)
|
||||||
|
|
||||||
# Note: "__VERSION__", "__APIVERSION__", "__INCLUDE__",
|
# Note: "__VERSION__", "__APIVERSION__", "__INCLUDE__",
|
||||||
# "__PLUGINPREFIX__" and "__DATAPREFIX__" are replaced by
|
# "__PLUGINPREFIX__", "__PLUGINDOCPREFIX__" and "__DATAPREFIX__" are replaced
|
||||||
# values in Tux Paint's Makefile, via 'sed', by the 'make tp-magic-config'
|
# by values in Tux Paint's Makefile, via 'sed', by the 'make tp-magic-config'
|
||||||
# target.
|
# target.
|
||||||
|
|
||||||
# July 5, 2007 - July 31, 2007
|
# July 5, 2007 - August 2, 2007
|
||||||
|
|
||||||
|
|
||||||
if [ $# -ne 0 ]; then
|
if [ $# -ne 0 ]; then
|
||||||
|
|
@ -54,7 +54,11 @@ if [ $# -ne 0 ]; then
|
||||||
echo "__PLUGINPREFIX__"
|
echo "__PLUGINPREFIX__"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
if [ $1 = "--plugindocprefix" ]; then
|
||||||
|
echo "__PLUGINDOCPREFIX__"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
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"
|
"Usage: %s {--usage | --help | --version | --verbose-version | --copying}\n"
|
||||||
"\n"
|
"\n"
|
||||||
" %s [--windowed | --fullscreen]\n"
|
" %s [--windowed | --fullscreen]\n"
|
||||||
" %s [--WIDTHxHEIGHT | --native] [--orient=landscape | --orient=portrait]\n"
|
" %s [--WIDTHxHEIGHT | --native]\n"
|
||||||
" %s [--startblank | --startlast ]\n"
|
" %s [--orient=landscape | --orient=portrait]\n"
|
||||||
" %s [--sound | --nosound] [--quit | --noquit]\n"
|
" %s [--startblank | --startlast]\n"
|
||||||
" %s [--print | --noprint] [--complexshapes | --simpleshapes]\n"
|
" %s [--sound | --nosound]\n"
|
||||||
|
" %s [--quit | --noquit]\n"
|
||||||
|
" %s [--print | --noprint]\n"
|
||||||
|
" %s [--complexshapes | --simpleshapes]\n"
|
||||||
" %s [--mixedcase | --uppercase]\n"
|
" %s [--mixedcase | --uppercase]\n"
|
||||||
" %s [--fancycursors | --nofancycursors | --hidecursor ]\n"
|
" %s [--fancycursors | --nofancycursors]\n"
|
||||||
" %s [--mouse | --keyboard] [--dontgrab | --grab]\n"
|
" %s [--hidecursor | --showcursor]\n"
|
||||||
" %s [--noshortcuts | --shortcuts] [--wheelmouse | --nowheelmouse]\n"
|
" %s [--mouse | --keyboard]\n"
|
||||||
" %s [--nobuttondistinction | --buttondistinction ]\n"
|
" %s [--dontgrab | --grab]\n"
|
||||||
" %s [--outlines | --nooutlines] [--stamps | --nostamps]\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 [--sysfonts | --nosysfonts]\n"
|
||||||
" %s [--nostampcontrols | --stampcontrols]\n"
|
" %s [--nostampcontrols | --stampcontrols]\n"
|
||||||
" %s [--mirrorstamps | --dontmirrorstamps]\n"
|
" %s [--mirrorstamps | --dontmirrorstamps]\n"
|
||||||
" %s [--saveoverask | --saveover | --saveovernew]\n"
|
" %s [--saveoverask | --saveover | --saveovernew]\n"
|
||||||
" %s [--nosave | --save] [--autosave | --noautosave]\n"
|
" %s [--nosave | --save]\n"
|
||||||
|
" %s [--autosave | --noautosave]\n"
|
||||||
" %s [--savedir DIRECTORY]\n"
|
" %s [--savedir DIRECTORY]\n"
|
||||||
#ifdef WIN32
|
" %s [--datadir DIRECTORY]\n"
|
||||||
|
#if defined(WIN32) || defined(__APPLE__)
|
||||||
" %s [--printcfg | --noprintcfg]\n"
|
" %s [--printcfg | --noprintcfg]\n"
|
||||||
#endif
|
#endif
|
||||||
" %s [--printdelay=SECONDS]\n"
|
" %s [--printdelay=SECONDS]\n"
|
||||||
|
|
@ -4899,11 +4908,15 @@ static void show_usage(FILE * f, char *prg)
|
||||||
" %s [--papersize PAPERSIZE | --papersize help]\n"
|
" %s [--papersize PAPERSIZE | --papersize help]\n"
|
||||||
#endif
|
#endif
|
||||||
" %s [--lang LANGUAGE | --locale LOCALE | --lang help]\n"
|
" %s [--lang LANGUAGE | --locale LOCALE | --lang help]\n"
|
||||||
" %s [--nosysconfig] [--nolockfile]\n"
|
" %s [--nosysconfig]\n"
|
||||||
|
" %s [--nolockfile]\n"
|
||||||
" %s [--colorfile FILE]\n"
|
" %s [--colorfile FILE]\n"
|
||||||
/* " %s [--record FILE | --playback FILE]\n" */
|
/* " %s [--record FILE | --playback FILE]\n" */
|
||||||
"\n",
|
"\n",
|
||||||
prg, prg,
|
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, 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)
|
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);
|
default_stamp_size = compute_default_scale_factor(1.0);
|
||||||
|
|
||||||
|
|
@ -5530,7 +5543,7 @@ static void load_stamps(SDL_Surface * screen)
|
||||||
#endif
|
#endif
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
free(homedirdir);
|
free(homedirdir);
|
||||||
homedirdir = get_fname("data/stamps");
|
homedirdir = get_fname("data/stamps", DIR_DATA);
|
||||||
load_stamp_dir(screen, homedirdir);
|
load_stamp_dir(screen, homedirdir);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -5688,13 +5701,41 @@ static void setup(int argc, char *argv[])
|
||||||
|
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
savedir = GetDefaultSaveDir("TuxPaint");
|
/* Windows */
|
||||||
#elif __BEOS__
|
|
||||||
savedir = strdup("./userdata");
|
|
||||||
#else
|
|
||||||
savedir = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
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: */
|
/* Load options from global config file: */
|
||||||
|
|
@ -5739,7 +5780,7 @@ static void setup(int argc, char *argv[])
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
/* Default local config file in users savedir directory on Windows */
|
/* 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__)
|
#elif defined(__BEOS__)
|
||||||
/* BeOS: Use a "tuxpaint.cfg" file: */
|
/* BeOS: Use a "tuxpaint.cfg" file: */
|
||||||
|
|
||||||
|
|
@ -6044,15 +6085,15 @@ static void setup(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
else if (strcmp(argv[i], "--noprintcfg") == 0)
|
else if (strcmp(argv[i], "--noprintcfg") == 0)
|
||||||
{
|
{
|
||||||
#ifndef WIN32
|
#if !defined(WIN32) && !defined(__APPLE__)
|
||||||
fprintf(stderr, "Note: printcfg option only applies to Windows!\n");
|
fprintf(stderr, "Note: printcfg option only applies to Windows and Mac OS X!\n");
|
||||||
#endif
|
#endif
|
||||||
use_print_config = 0;
|
use_print_config = 0;
|
||||||
}
|
}
|
||||||
else if (strcmp(argv[i], "--printcfg") == 0)
|
else if (strcmp(argv[i], "--printcfg") == 0)
|
||||||
{
|
{
|
||||||
#ifndef WIN32
|
#if !defined(WIN32) && !defined(__APPLE__)
|
||||||
fprintf(stderr, "Note: printcfg option only applies to Windows!\n");
|
fprintf(stderr, "Note: printcfg option only applies to Windows and Mac OS X!\n");
|
||||||
#endif
|
#endif
|
||||||
use_print_config = 1;
|
use_print_config = 1;
|
||||||
}
|
}
|
||||||
|
|
@ -6126,6 +6167,26 @@ static void setup(int argc, char *argv[])
|
||||||
exit(1);
|
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 ||
|
else if (strcmp(argv[i], "--record") == 0 ||
|
||||||
strcmp(argv[i], "--playback") == 0)
|
strcmp(argv[i], "--playback") == 0)
|
||||||
{
|
{
|
||||||
|
|
@ -6251,9 +6312,9 @@ static void setup(int argc, char *argv[])
|
||||||
/* Look for the lockfile... */
|
/* Look for the lockfile... */
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
lock_fname = get_fname("lockfile.dat");
|
lock_fname = get_fname("lockfile.dat", DIR_SAVE);
|
||||||
#else
|
#else
|
||||||
lock_fname = get_temp_fname("lockfile.dat");
|
lock_fname = get_temp_fname("lockfile.dat", DIR_SAVE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fi = fopen(lock_fname, "r");
|
fi = fopen(lock_fname, "r");
|
||||||
|
|
@ -6289,7 +6350,7 @@ static void setup(int argc, char *argv[])
|
||||||
/* Okay to run; create/update the lockfile */
|
/* Okay to run; create/update the lockfile */
|
||||||
|
|
||||||
/* (Make sure the directory exists, first!) */
|
/* (Make sure the directory exists, first!) */
|
||||||
homedirdir = get_fname("");
|
homedirdir = get_fname("", DIR_SAVE);
|
||||||
mkdir(homedirdir, 0755);
|
mkdir(homedirdir, 0755);
|
||||||
free(homedirdir);
|
free(homedirdir);
|
||||||
|
|
||||||
|
|
@ -6978,11 +7039,11 @@ static void setup(int argc, char *argv[])
|
||||||
|
|
||||||
/* Load brushes: */
|
/* Load brushes: */
|
||||||
load_brush_dir(screen, DATA_PREFIX "brushes");
|
load_brush_dir(screen, DATA_PREFIX "brushes");
|
||||||
homedirdir = get_fname("brushes");
|
homedirdir = get_fname("brushes", DIR_DATA);
|
||||||
load_brush_dir(screen, homedirdir);
|
load_brush_dir(screen, homedirdir);
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
free(homedirdir);
|
free(homedirdir);
|
||||||
homedirdir = get_fname("data/brushes");
|
homedirdir = get_fname("data/brushes", DIR_DATA);
|
||||||
load_brush_dir(screen, homedirdir);
|
load_brush_dir(screen, homedirdir);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -10401,7 +10462,7 @@ static void load_starter_id(char *saved_id)
|
||||||
int r, g, b;
|
int r, g, b;
|
||||||
|
|
||||||
snprintf(fname, sizeof(fname), "saved/%s.dat", saved_id);
|
snprintf(fname, sizeof(fname), "saved/%s.dat", saved_id);
|
||||||
rname = get_fname(fname);
|
rname = get_fname(fname, DIR_SAVE);
|
||||||
|
|
||||||
starter_id[0] = '\0';
|
starter_id[0] = '\0';
|
||||||
|
|
||||||
|
|
@ -10457,7 +10518,7 @@ static void load_starter(char *img_id)
|
||||||
if (starter_personal == 0)
|
if (starter_personal == 0)
|
||||||
dirname = strdup(DATA_PREFIX "starters");
|
dirname = strdup(DATA_PREFIX "starters");
|
||||||
else
|
else
|
||||||
dirname = get_fname("starters");
|
dirname = get_fname("starters", DIR_DATA);
|
||||||
|
|
||||||
/* Clear them to NULL first: */
|
/* Clear them to NULL first: */
|
||||||
img_starter = NULL;
|
img_starter = NULL;
|
||||||
|
|
@ -10562,7 +10623,7 @@ static void load_current(void)
|
||||||
|
|
||||||
/* Determine the current picture's ID: */
|
/* Determine the current picture's ID: */
|
||||||
|
|
||||||
fname = get_fname("current_id.txt");
|
fname = get_fname("current_id.txt", DIR_SAVE);
|
||||||
|
|
||||||
fi = fopen(fname, "r");
|
fi = fopen(fname, "r");
|
||||||
if (fi == NULL)
|
if (fi == NULL)
|
||||||
|
|
@ -10594,7 +10655,7 @@ static void load_current(void)
|
||||||
{
|
{
|
||||||
snprintf(ftmp, sizeof(ftmp), "saved/%s%s", file_id, FNAME_EXTENSION);
|
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);
|
tmp = IMG_Load(fname);
|
||||||
|
|
||||||
|
|
@ -10634,7 +10695,7 @@ static int make_directory(const char *path, const char *errmsg)
|
||||||
char *fname;
|
char *fname;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
fname = get_fname(path);
|
fname = get_fname(path, DIR_SAVE);
|
||||||
res = mkdir(fname, 0755);
|
res = mkdir(fname, 0755);
|
||||||
if (res != 0 && errno != EEXIST)
|
if (res != 0 && errno != EEXIST)
|
||||||
{
|
{
|
||||||
|
|
@ -10662,7 +10723,7 @@ static void save_current(void)
|
||||||
draw_tux_text(TUX_OOPS, strerror(errno), 0);
|
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");
|
fi = fopen(fname, "w");
|
||||||
if (fi == NULL)
|
if (fi == NULL)
|
||||||
|
|
@ -11360,9 +11421,9 @@ static void cleanup(void)
|
||||||
FILE *fi;
|
FILE *fi;
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
lock_fname = get_fname("lockfile.dat");
|
lock_fname = get_fname("lockfile.dat", DIR_SAVE);
|
||||||
#else
|
#else
|
||||||
lock_fname = get_temp_fname("lockfile.dat");
|
lock_fname = get_temp_fname("lockfile.dat", DIR_SAVE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
zero_time = (time_t) 0;
|
zero_time = (time_t) 0;
|
||||||
|
|
@ -11802,7 +11863,7 @@ static int do_save(int tool, int dont_show_success_results)
|
||||||
/* Save the file: */
|
/* Save the file: */
|
||||||
|
|
||||||
snprintf(tmp, sizeof(tmp), "saved/%s%s", file_id, FNAME_EXTENSION);
|
snprintf(tmp, sizeof(tmp), "saved/%s%s", file_id, FNAME_EXTENSION);
|
||||||
fname = get_fname(tmp);
|
fname = get_fname(tmp, DIR_SAVE);
|
||||||
debug(fname);
|
debug(fname);
|
||||||
|
|
||||||
fi = fopen(fname, "wb");
|
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?) */
|
/* (Was thumbnail in old directory, rather than under .thumbs?) */
|
||||||
|
|
||||||
snprintf(tmp, sizeof(tmp), "saved/%s-t%s", file_id, FNAME_EXTENSION);
|
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");
|
fi = fopen(fname, "r");
|
||||||
if (fi != NULL)
|
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,
|
snprintf(tmp, sizeof(tmp), "saved/.thumbs/%s-t%s", file_id,
|
||||||
FNAME_EXTENSION);
|
FNAME_EXTENSION);
|
||||||
fname = get_fname(tmp);
|
fname = get_fname(tmp, DIR_SAVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
debug(fname);
|
debug(fname);
|
||||||
|
|
@ -11880,7 +11941,7 @@ static int do_save(int tool, int dont_show_success_results)
|
||||||
canvas_color_b != 255)
|
canvas_color_b != 255)
|
||||||
{
|
{
|
||||||
snprintf(tmp, sizeof(tmp), "saved/%s.dat", file_id);
|
snprintf(tmp, sizeof(tmp), "saved/%s.dat", file_id);
|
||||||
fname = get_fname(tmp);
|
fname = get_fname(tmp, DIR_SAVE);
|
||||||
fi = fopen(fname, "w");
|
fi = fopen(fname, "w");
|
||||||
if (fi != NULL)
|
if (fi != NULL)
|
||||||
{
|
{
|
||||||
|
|
@ -12165,7 +12226,7 @@ int do_open(void)
|
||||||
{
|
{
|
||||||
/* First, check for saved-images: */
|
/* 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)
|
else if (places_to_look == PLACE_PERSONAL_STARTERS_DIR)
|
||||||
{
|
{
|
||||||
|
|
@ -12926,7 +12987,7 @@ int do_open(void)
|
||||||
snprintf(fname, sizeof(fname), "saved/%s%s",
|
snprintf(fname, sizeof(fname), "saved/%s%s",
|
||||||
d_names[which], d_exts[which]);
|
d_names[which], d_exts[which]);
|
||||||
|
|
||||||
rfname = get_fname(fname);
|
rfname = get_fname(fname, DIR_SAVE);
|
||||||
debug(rfname);
|
debug(rfname);
|
||||||
|
|
||||||
if (unlink(rfname) == 0)
|
if (unlink(rfname) == 0)
|
||||||
|
|
@ -12940,7 +13001,7 @@ int do_open(void)
|
||||||
"saved/.thumbs/%s-t.png", d_names[which]);
|
"saved/.thumbs/%s-t.png", d_names[which]);
|
||||||
|
|
||||||
free(rfname);
|
free(rfname);
|
||||||
rfname = get_fname(fname);
|
rfname = get_fname(fname, DIR_SAVE);
|
||||||
debug(rfname);
|
debug(rfname);
|
||||||
|
|
||||||
unlink(rfname);
|
unlink(rfname);
|
||||||
|
|
@ -12952,7 +13013,7 @@ int do_open(void)
|
||||||
snprintf(fname, sizeof(fname), "saved/%s-t.png", d_names[which]);
|
snprintf(fname, sizeof(fname), "saved/%s-t.png", d_names[which]);
|
||||||
|
|
||||||
free(rfname);
|
free(rfname);
|
||||||
rfname = get_fname(fname);
|
rfname = get_fname(fname, DIR_SAVE);
|
||||||
debug(rfname);
|
debug(rfname);
|
||||||
|
|
||||||
unlink(rfname);
|
unlink(rfname);
|
||||||
|
|
@ -12964,7 +13025,7 @@ int do_open(void)
|
||||||
snprintf(fname, sizeof(fname), "saved/%s.dat", d_names[which]);
|
snprintf(fname, sizeof(fname), "saved/%s.dat", d_names[which]);
|
||||||
|
|
||||||
free(rfname);
|
free(rfname);
|
||||||
rfname = get_fname(fname);
|
rfname = get_fname(fname, DIR_SAVE);
|
||||||
debug(rfname);
|
debug(rfname);
|
||||||
|
|
||||||
unlink(rfname);
|
unlink(rfname);
|
||||||
|
|
@ -13201,7 +13262,7 @@ int do_slideshow(void)
|
||||||
|
|
||||||
/* Load list of saved-images: */
|
/* Load list of saved-images: */
|
||||||
|
|
||||||
dirname = get_fname("saved");
|
dirname = get_fname("saved", DIR_SAVE);
|
||||||
|
|
||||||
|
|
||||||
/* Read directory of images and build thumbnails: */
|
/* Read directory of images and build thumbnails: */
|
||||||
|
|
@ -14522,7 +14583,7 @@ void do_print(void)
|
||||||
char f[512];
|
char f[512];
|
||||||
int show = (want_alt_printcommand && !fullscreen);
|
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 =
|
const char *error =
|
||||||
|
|
@ -15176,16 +15237,16 @@ static void parse_options(FILE * fi)
|
||||||
}
|
}
|
||||||
else if (strcmp(str, "printcfg=yes") == 0)
|
else if (strcmp(str, "printcfg=yes") == 0)
|
||||||
{
|
{
|
||||||
#ifndef WIN32
|
#if !defined(WIN32) && !defined(__APPLE__)
|
||||||
fprintf(stderr, "Note: printcfg option only applies to Windows!\n");
|
fprintf(stderr, "Note: printcfg option only applies to Windows and Mac OS X!\n");
|
||||||
#endif
|
#endif
|
||||||
use_print_config = 1;
|
use_print_config = 1;
|
||||||
}
|
}
|
||||||
else if (strcmp(str, "printcfg=no") == 0 ||
|
else if (strcmp(str, "printcfg=no") == 0 ||
|
||||||
strcmp(str, "noprintcfg=yes") == 0)
|
strcmp(str, "noprintcfg=yes") == 0)
|
||||||
{
|
{
|
||||||
#ifndef WIN32
|
#if !defined(WIN32) && !defined(__APPLE__)
|
||||||
fprintf(stderr, "Note: printcfg option only applies to Windows!\n");
|
fprintf(stderr, "Note: printcfg option only applies to Windows and Mac OS X!\n");
|
||||||
#endif
|
#endif
|
||||||
use_print_config = 0;
|
use_print_config = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -15248,6 +15309,15 @@ static void parse_options(FILE * fi)
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("savedir set to: %s\n", savedir);
|
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
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -16698,7 +16768,7 @@ int do_new_dialog(void)
|
||||||
{
|
{
|
||||||
/* Check for coloring-book style 'starter' images in our folder: */
|
/* 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)
|
else if (places_to_look == PLACE_STARTERS_DIR)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue