Beginning to implement switchin() and switchout() Magic tool plugin API.

This commit is contained in:
William Kendrick 2008-07-08 00:21:31 +00:00
parent b14e850f12
commit b4ed444f0f
40 changed files with 389 additions and 420 deletions

View file

@ -4,14 +4,14 @@
# bill@newbreedsoftware.com # bill@newbreedsoftware.com
# http://www.tuxpaint.org/ # http://www.tuxpaint.org/
# June 14, 2002 - June 22, 2008 # June 14, 2002 - July 7, 2008
# The version number, for release: # The version number, for release:
VER_VERSION:=0.9.20 VER_VERSION:=0.9.21
VER_DATE:=$(shell date +"%Y-%m-%d") VER_DATE:=$(shell date +"%Y-%m-%d")
MAGIC_API_VERSION:=0x00000001 MAGIC_API_VERSION:=0x00000002
# Need to know the OS # Need to know the OS

View file

@ -1,272 +0,0 @@
Tux Paint
version 0.9.20
Advanced Stamps HOWTO
Copyright 2006-2008 by Albert Cahalan for the Tux Paint project
New Breed Software
albert@users.sf.net
http://www.tuxpaint.org/
March 8, 2006 - February 28, 2008
About this HOWTO
This HOWTO assumes that you want to make an excellent Tux Paint stamp,
in PNG bitmapped format, from a JPEG image (e.g., a digital photograph).
There are easier and faster methods that produce lower quality.
This HOWTO assumes you are dealing with normal opaque objects. Dealing
with semi-transparent objects (fire, moving fan blade, kid's baloon) or
light-giving objects (fire, lightbulb, sun) is best done with custom
software. Images with perfect solid-color backgrounds are also best done
with custom software, but are not troublesome to do as follows.
Image choice is crucial
License
If you wish to submit artwork to the Tux Paint developers for
consideration for inclusion in the official project, or if you wish to
release your own copy of Tux Paint, bundled with your own graphics,
you need an image that is compatible with the GNU General Public
License used by Tux Paint.
Images produced by the US government are Public Domain, but be aware
that the US government sometimes uses other images on the web. Google
image queries including either site:gov or site:mil will supply many
suitable images. (Note: the *.mil sites include non-military content,
too!)
Your own images can be placed in the Public Domain by declaring it so.
(Hire a lawyer if you feel the need for legal advice.)
For personal use, any image you can legitimately modify and use for
your own personal use should be fine.
Image Size and Orientation:
You need an image that has a useful orientation. Perspective is an
enemy. Images that show an object from the corner are difficult to fit
into a nice drawing. As a general rule, telephoto side views are the
best. The impossible ideal is that, for example, two wheels of a car
are perfectly hidden behind the other two.
Rotating an image can make it blurry, especially if you only rotate by
a few degrees. Images that don't need rotation are best, images that
need lots of rotation (30 to 60 degrees) are next best, and images
that need just a few degrees are worst. Rotation will also make an
image darker because most image editing software is very bad about
gamma handling. (Rotation is only legitimate for gamma=1.0 images.)
Very large images are more forgiving of mistakes, and thus easier to
work with. Choose an image with an object that is over 1000 pixels
across if you can. You can shrink this later to hide your mistakes.
Be sure that the image is not too grainy, dim, or washed out.
Pay attention to feet and wheels. If they are buried in something, you
will need to draw new ones. If only one is buried, you might be able
to copy the other one as a replacement.
Prepare the image:
First of all, be sure to avoid re-saving the image as a JPEG. This
causes quality loss. There is a special tool called jpegtran that lets
you crop an image without the normal quality loss. If you want a GUI for
it, use ljcrop. Otherwise, use it like this:
jpegtran -trim -copy none -crop 512x1728+160+128 < src.jpg >
cropped.jpg
Bring that image up in your image editor. If you didn't crop it yet, you
may find that your image editor is very slow. Rotate and crop the image
as needed. Save the image -- choose whatever native format supports
layers, masks, alpha, etc. GIMP users should choose "XCF", and Adobe
Photoshop users should choose "PSD", for example.
If you have rotated or cropped the image in your image editor, flatten
it now. You need to have just one RGB layer without mask or alpha.
Open the layers dialog box. Replicate the one layer several times. From
top to bottom you will need something like this:
1. unmodified image (write-protect this if you can)
2. an image you will modify -- the "WIP" layer
3. solid green (write-protect this if you can)
4. solid magenta (write-protect this if you can)
5. unmodified image (write-protect this if you can)
Give the WIP layer a rough initial mask. You might start with a
selection, or by using the grayscale value of the WIP layer. You might
invert the mask.
Warning: once you have the mask, you may not rotate or scale the image
normally. This would cause data loss. You will be given special scaling
instructions later.
Prepare the mask:
Get used to doing Ctrl-click and Alt-click on the thumbnail images in
the layers dialog. You will need this to control what you are looking at
and what you are editing. Sometimes you will be editing things you can't
see. For example, you might edit the mask of the WIP layer while looking
at the unmodified image. Pay attention so you don't screw up. Always
verify that you are editing the right thing.
Set an unmodified image as what you will view (the top one is easiest).
Set the WIP mask as what you will edit. At some point, perhaps not
immediately, you should magnify the image to about 400% (each pixel of
the image is seen and edited as a 4x4 block of pixels on your screen).
Select parts of the image that need to be 100% opaque or 0% opaque. If
you can select the object or background somewhat accurately by color, do
so. As needed to avoid selecting any pixels that should be partially
opaque (generally at the edge of the object) you should grow, shrink,
and invert the selection.
Fill the 100% opaque areas with white, and the 0% opaque areas with
black. This is most easily done by drag-and-drop from the
foreground/background color indicator. You should not see anything
happen, because you are viewing the unmodified image layer while editing
the mask of the WIP layer. Large changes might be noticable in the
thumbnail.
Now you must be zoomed in.
Check your work. Hide the top unmodified image layer. Display just the
mask, which should be a white object on a black background (probably
with unedited grey at the edge). Now display the WIP layer normally, so
that the mask is active. This should show your object over top of the
next highest enabled layer, which should be green or magenta as needed
for maximum contrast. You might wish to flip back and forth between
those backgrounds by repeatedly clicking to enable/disable the green
layer. Fix any obvious and easy problems by editing the mask while
viewing the mask.
Go back to viewing the top unmodified layer while editing the WIP mask.
Set your drawing tool the paintbrush. For the brush, choose a small
fuzzy circle. The 5x5 size is good for most uses.
With a steady hand, trace around the image. Use black around the
outside, and white around the inside. Avoid making more than one pass
without switching colors (and thus sides).
Flip views a bit, checking to see that the mask is working well. When
the WIP layer is composited over the green or magenta, you should see a
tiny bit of the original background as an ugly fringe around the edge.
If this fringe is missing, then you made the object mask too small. The
fringe consists of pixels that are neither 100% object nor 0% object.
For them, the mask should be neither 100% nor 0%. The fringe gets
removed soon.
View and edit the mask. Select by color, choosing either black or white.
Most likely you will see unselected specks that are not quite the
expected color. Invert the selection, then paint these away using the
pencil tool. Do this operation for both white and black.
Replace the fringe and junk pixels:
Still viewing the mask, select by color. Choose black. Shrink the
selection by several pixels, being sure to NOT shrink from the edges of
the mask (the shrink helps you avoid and recover from mistakes).
Now disable the mask. View and edit the unmasked WIP layer. Using the
color picker tool, choose a color that is average for the object.
Drag-and-drop this color into the selection, thus removing most of the
non-object pixels.
This solid color will compress well and will help prevent ugly color
fringes when Tux Paint scales the image down. If the edge of the object
has multiple colors that are very different, you should split up your
selection so that you can color the nearby background to be similar.
Now you will paint away the existing edge fringe. Be sure that you are
editing and viewing the WIP image. Frequent layer visibility changes
will help you to see what you are doing. You are likely to use all of:
* composited over green (mask enabled)
* composited over magenta (mask enabled)
* original (the top or bottom layer)
* composited over the original (mask enabled)
* raw WIP layer (mask DISABLED)
To reduce accidents, you may wish to select only those pixels that are
not grey in the mask. (Select by color from the mask, choose black, add
mode, choose white, invert. Alternately: Select all, select by color
from the mask, subtract mode, choose black, choose white.) If you do
this, you'll probably want to expand the selection a bit and/or hide the
"crawling ants" line that marks the selection.
Use the clone tool and the brush tool. Vary the opacity as needed. Use
small round brushes mostly, perhaps 3x3 or 5x5, fuzzy or not. (It is
generally nice to pair up fuzzy brushes with 100% opacity and non-fuzzy
brushes with about 70% opacity.) Unusual drawing modes can be helpful
with semi-transparent objects.
The goal is to remove the edge fringe, both inside and outside of the
object. The inside fringe, visible when the object is composited over
magenta or green, must be removed for obvious reasons. The outside
fringe must also be removed because it will become visible when the
image is scaled down. As an example, consider a 2x2 region of pixels at
the edge of a sharp-edged object. The left half is black and 0% opaque.
The right half is white and 100% opaque. That is, we have a white object
on a black background. When Tux Paint scales this to 50% (a 1x1 pixel
area), the result will be a grey 50% opaque pixel. The correct result
would be a white 50% opaque pixel. To get this result, we would paint
away the black pixels. They matter, despite being 0% opaque.
Tux Paint can scale images down by a very large factor, so it is
important to extend the edge of your object outward by a great deal.
Right at the edge of your object, you should be very accurate about
this. As you go outward away from the object, you can get a bit sloppy.
It is reasonable to paint outward by a dozen pixels or more. The farther
you go, the more Tux Paint can scale down without creating ugly color
fringes. For areas that are more than a few pixels away from the object
edge, you should use the pencil tool (or sloppy select with
drag-and-drop color) to ensure that the result will compress well.
Save the image for Tux Paint
It is very easy to ruin your hard work. Image editors can silently
destroy pixels in 0% opaque areas. The conditions under which this
happens may vary from version to version. If you are very trusting, you
can try saving your image directly as a PNG. Be sure to read it back in
again to verify that the 0% opaque areas didn't turn black or white,
which would create fringes when Tux Paint scales the image down. If you
need to scale your image to save space (and hide your mistakes), you are
almost certain to destroy all the 0% opaque areas. So here is a better
way...
A Safer Way to Save:
Drag the mask from the layers dialog to the unused portion of the
toolbar (right after the last drawing tool). This will create a new
image consisting of one layer that contains the mask data. Scale this
as desired, remembering the settings you use. Often you should start
with an image that is about 700 to 1500 pixels across, and end up with
one that is 300 to 400.
Save the mask image as a NetPBM portable greymap (".pgm") file. (If
you are using an old release of The GIMP, you might need to convert
the image to greyscale before you can save it.) Choose the more
compact "RAW PGM" format. (The second character of the file should be
the ASCII digit "5", hex byte 0x35.)
You may close the mask image.
Going back to the multi-layer image, now select the WIP layer. As you
did with the mask, drag this from the layers dialog to the toolbar.
You should get a single-layer image of your WIP data. If the mask came
along too, get rid of it. You should be seeing the object and the
painted-away surroundings, without any mask thumbnail in the layers
dialog. If you scaled the mask, then scale this image in exactly the
same way. Save this image as a NetPBM portable pixmap (".ppm") file.
(Note: ppm, not pgm.) (If you choose the RAW PPM format, the second
byte of the file should be the ASCII digit "6", hex byte 0x36.)
Now you need to merge the two files into one. Do that with the
pnmtopng command, like this:
pnmtopng -force -compression 9 -alpha mask.pgm fg.ppm >
final-stamp.png

View file

@ -19,6 +19,11 @@ $Id$
* BlurAll, Sharpen and BlackandWhite * BlurAll, Sharpen and BlackandWhite
Andrew Corcoran <akanewbie@gmail.com> Andrew Corcoran <akanewbie@gmail.com>
* Magic Tool Plug-in API Updates:
-------------------------------
* Added "_switchin()" and "_switchout()" functions, to tell Magic tools
when they are selected or deselected.
* Build System Improvements * Build System Improvements
------------------------- -------------------------
* Adhering to Debian & FreeDesktop.org standards regarding .desktop file. * Adhering to Debian & FreeDesktop.org standards regarding .desktop file.

View file

@ -1,5 +1,5 @@
Tux Paint Tux Paint
version 0.9.20 version 0.9.21
Extending Tux Paint Extending Tux Paint
Copyright 2002-2008 by Bill Kendrick and others Copyright 2002-2008 by Bill Kendrick and others
@ -8,9 +8,9 @@
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
June 14, 2002 - March 27, 2008 June 14, 2002 - July 7, 2008
-------------------------------------------------------------------------- ----------------------------------------------------------------------
If you wish to add or change things like Brushes and Rubber Stamps used by If you wish to add or change things like Brushes and Rubber Stamps used by
Tux Paint, you can do it fairly easily by simply putting or removing files Tux Paint, you can do it fairly easily by simply putting or removing files
@ -77,7 +77,7 @@ Where Files Go
/Users/(user name)/Library/Preferences/TuxPaint/brushes/ /Users/(user name)/Library/Preferences/TuxPaint/brushes/
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Personal Files Personal Files
@ -114,7 +114,7 @@ Where Files Go
(For example, if you created a brush named "flower.png", you would put (For example, if you created a brush named "flower.png", you would put
it in "~/.tuxpaint/brushes/" under Linux or Unix.) it in "~/.tuxpaint/brushes/" under Linux or Unix.)
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Brushes Brushes
@ -202,7 +202,7 @@ Brushes
it's because you forgot to use alpha transparency! See the documentation it's because you forgot to use alpha transparency! See the documentation
file "PNG.txt" for more information and tips. file "PNG.txt" for more information and tips.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Stamps Stamps
@ -245,7 +245,7 @@ Stamps
make PNG images which will scale perfectly when used as stamps in make PNG images which will scale perfectly when used as stamps in
Tux Paint. Tux Paint.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Description Text Description Text
@ -281,7 +281,7 @@ Stamps
them as Plain Text, and make sure they have ".txt" at the end of the them as Plain Text, and make sure they have ".txt" at the end of the
filename... filename...
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Sound Effects Sound Effects
@ -306,7 +306,7 @@ Stamps
Note: For descriptive sounds (not sound effects, like a bang or a bird Note: For descriptive sounds (not sound effects, like a bang or a bird
chirping), consider using the Descriptive Sounds, described below. chirping), consider using the Descriptive Sounds, described below.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Descriptive Sound Descriptive Sound
@ -328,7 +328,7 @@ Stamps
attempt to load the 'default' descriptive sound file. (e.g., attempt to load the 'default' descriptive sound file. (e.g.,
"picture_desc.wav") "picture_desc.wav")
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Stamp Options Stamp Options
@ -453,7 +453,7 @@ Stamps
"_mirror_flip" doesn't exist, but either "_flip" or "_mirror" does, it "_mirror_flip" doesn't exist, but either "_flip" or "_mirror" does, it
will be used, and mirrored or flipped, respectively. will be used, and mirrored or flipped, respectively.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Fonts Fonts
@ -463,7 +463,7 @@ Fonts
and provide four different sizes in the 'Letters' selector when using and provide four different sizes in the 'Letters' selector when using
the 'Text' tool. the 'Text' tool.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
'Starters' 'Starters'
@ -542,7 +542,7 @@ Fonts
picture loaded or started. (In other words, if you base a drawing on a picture loaded or started. (In other words, if you base a drawing on a
'starter' image, it will always be affected by it.) 'starter' image, it will always be affected by it.)
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Translations Translations
@ -557,12 +557,12 @@ Translations
"pt_br.po" for Brazilian Portuguese, versus "pt.po" or "pt_pt.po" for "pt_br.po" for Brazilian Portuguese, versus "pt.po" or "pt_pt.po" for
Portuguese spoken in Portugal.) Portuguese spoken in Portugal.)
Open the newly-created ".po" file -- you can edit in a plain text Open the newly-created ".po" file - you can edit in a plain text edtior,
edtior, such as Emacs, Pico or VI on Linux, or NotePad on Windows. The such as Emacs, Pico or VI on Linux, or NotePad on Windows. The original
original English text used in Tux Paint is listed in lines starting with English text used in Tux Paint is listed in lines starting with "msgid".
"msgid". Enter your translations of each of these pieces of text in the Enter your translations of each of these pieces of text in the empty
empty "msgstr" lines directly below the corresponding "msgid" lines. "msgstr" lines directly below the corresponding "msgid" lines. (Note: Do
(Note: Do not remove the quotes.) not remove the quotes.)
Example: Example:
@ -649,7 +649,7 @@ Alternative Input Methods
30AE gi - 30AE gi -
Note: Blank lines within the ".im" file will be ignored, as will any Note: Blank lines within the ".im" file will be ignored, as will any
text following a "#" (pound/hash) character -- it can be used to denote text following a "#" (pound/hash) character - it can be used to denote
comments, as seen in the example above. comments, as seen in the example above.
Note: Meanings of the flags are locale-specific, and are processed by Note: Meanings of the flags are locale-specific, and are processed by

View file

@ -1,5 +1,5 @@
Tux Paint Tux Paint
version 0.9.20 version 0.9.21
Frequently Asked Questions Frequently Asked Questions
Copyright 2002-2008 by Bill Kendrick and others Copyright 2002-2008 by Bill Kendrick and others
@ -8,7 +8,7 @@
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
September 14, 2002 - February 28, 2008 September 14, 2002 - July 7, 2008
Drawing-related Drawing-related
@ -132,7 +132,6 @@ Interface Problems
to my language", below. to my language", below.
* Tux Paint won't switch to my language * Tux Paint won't switch to my language
* Linux and Unix users: Make sure the locale is available * Linux and Unix users: Make sure the locale is available
Make sure the locale you want is available. Check your Make sure the locale you want is available. Check your
@ -318,9 +317,7 @@ Saving
Audio Problems Audio Problems
* There's no sound! * There's no sound!
* First, check the obvious: * First, check the obvious:
* Are your speakers connected and turned on? * Are your speakers connected and turned on?
* Is the volume turned up on your speakers? * Is the volume turned up on your speakers?
* Is the volume turned up in your Operating System's "mixer?" * Is the volume turned up in your Operating System's "mixer?"
@ -333,7 +330,6 @@ Audio Problems
"export SDL_AUDIODRIVER=arts"). Or, run Tux Paint through "export SDL_AUDIODRIVER=arts"). Or, run Tux Paint through
the system's rerouter (e.g., run "artsdsp tuxpaint" or the system's rerouter (e.g., run "artsdsp tuxpaint" or
"esddsp tuxpaint", instead of simply "tuxpaint"). "esddsp tuxpaint", instead of simply "tuxpaint").
* Is sound disabled in Tux Paint? * Is sound disabled in Tux Paint?
If sound seems to work otherwise (and you're sure no other If sound seems to work otherwise (and you're sure no other
@ -385,7 +381,6 @@ Audio Problems
* Press [Alt] + [S] while in Tux Paint to temporarily disable * Press [Alt] + [S] while in Tux Paint to temporarily disable
sounds. (Press that key sequence again to re-enable sounds.) sounds. (Press that key sequence again to re-enable sounds.)
* Run Tux Paint with the "no sound" option: * Run Tux Paint with the "no sound" option:
* Use Tux Paint Config to uncheck the "Enable Sound Effects" * Use Tux Paint Config to uncheck the "Enable Sound Effects"
option (under "Video & Sound"). option (under "Video & Sound").
* Edit Tux Paint's configuration file (see OPTIONS for * Edit Tux Paint's configuration file (see OPTIONS for
@ -394,7 +389,6 @@ Audio Problems
or desktop icon. or desktop icon.
* Recompile Tux Paint with sound support disabled. (See above * Recompile Tux Paint with sound support disabled. (See above
and INSTALL.txt.) and INSTALL.txt.)
* The sound effects sound strange * The sound effects sound strange
This could have to do with how SDL and SDL_mixer were initialized. This could have to do with how SDL and SDL_mixer were initialized.
@ -459,7 +453,7 @@ Fullscreen Mode Problems
Or use Tux Paint Config. and make sure "Fullscreen" (under "Video & Or use Tux Paint Config. and make sure "Fullscreen" (under "Video &
Sound") is not checked. Sound") is not checked.
Other Problems Other Probelms
* Tux Paint won't run * Tux Paint won't run

View file

@ -1,5 +1,5 @@
Tux Paint Tux Paint
version 0.9.20 version 0.9.21
Options Documentation Options Documentation
@ -9,7 +9,7 @@ Options Documentation
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
April 5, 2008 July 7, 2008
---------------------------------------------------------------------- ----------------------------------------------------------------------

View file

@ -1,7 +1,7 @@
Tux Paint Tux Paint
version 0.9.20 version 0.9.21
A simple drawing program for children A simple drawing program for children
Copyright 2002-2008 by Bill Kendrick and others Copyright 2002-2008 by Bill Kendrick and others
New Breed Software New Breed Software
@ -9,9 +9,9 @@
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
June 14, 2002 - March 27, 2008 June 14, 2002 - July 7, 2008
-------------------------------------------------------------------------- ----------------------------------------------------------------------
+-------------------------------------------+ +-------------------------------------------+
| Table of Contents | | Table of Contents |
@ -23,7 +23,7 @@
| * How to Get Help | | * How to Get Help |
+-------------------------------------------+ +-------------------------------------------+
-------------------------------------------------------------------------- ----------------------------------------------------------------------
About About
@ -77,7 +77,7 @@ Objectives:
is done by selecting it from a collection of thumbnails. is done by selecting it from a collection of thumbnails.
Access to other files on the computer is restricted. Access to other files on the computer is restricted.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Using Tux Paint Using Tux Paint
@ -85,7 +85,7 @@ Loading Tux Paint
Linux/Unix Users Linux/Unix Users
Tux Paint should have placed a launcher icon in your KDE and/or GNOME Tux Paint should have placed a laucher icon in your KDE and/or GNOME
menus, under 'Graphics.' menus, under 'Graphics.'
Alternatively, you can run the following command at a shell prompt Alternatively, you can run the following command at a shell prompt
@ -96,7 +96,7 @@ Loading Tux Paint
If any errors occur, they will be displayed on the terminal (to If any errors occur, they will be displayed on the terminal (to
"stderr"). "stderr").
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Windows Users Windows Users
@ -122,13 +122,13 @@ Loading Tux Paint
If you used the 'ZIP-file' download, Tux Paint's folder will be If you used the 'ZIP-file' download, Tux Paint's folder will be
wherever you put it when you unzipped the ZIP file. wherever you put it when you unzipped the ZIP file.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Mac OS X Users Mac OS X Users
Simply double-click the "Tux Paint" icon. Simply double-click the "Tux Paint" icon.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Title Screen Title Screen
@ -140,7 +140,7 @@ Title Screen
continue. (Or, after about 30 seconds, the title screen will go away continue. (Or, after about 30 seconds, the title screen will go away
automatically.) automatically.)
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Main Screen Main Screen
@ -150,8 +150,8 @@ Main Screen
The toolbar contains the drawing and editing controls. The toolbar contains the drawing and editing controls.
[Tools: Paint, Stamp, Lines, Shapes, Text, Magic, Undo, Redo, Eraser, New, Open, [Tools: Paint, Stamp, Lines, Shapes, Text, Magic, Undo, Redo, Eraser, New,
Save, Print, Quit] Open, Save, Print, Quit]
Middle: Drawing Canvas Middle: Drawing Canvas
@ -179,8 +179,8 @@ Main Screen
A palette of available colors are shown near the bottom of the A palette of available colors are shown near the bottom of the
screen. screen.
[Colors - Black, White, Red, Pink, Orange, Yellow, Green, Cyan, Blue, Purple, [Colors - Black, White, Red, Pink, Orange, Yellow, Green, Cyan, Blue,
Brown, Grey] Purple, Brown, Grey]
(NOTE: You can define your own colors for Tux Paint. See the (NOTE: You can define your own colors for Tux Paint. See the
"Options" documentation.) "Options" documentation.)
@ -190,10 +190,11 @@ Main Screen
At the very bottom of the screen, Tux, the Linux Penguin, At the very bottom of the screen, Tux, the Linux Penguin,
provides tips and other information while you draw. provides tips and other information while you draw.
(For example: 'Pick a shape. Click to pick the center, drag, then let go when it (For example: 'Pick a shape. Click to pick the center, drag, then let go
is the size you want. Move around to rotate it, and click to draw it.) when it is the size you want. Move around to rotate it, and click to draw
it.)
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Available Tools Available Tools
@ -211,7 +212,7 @@ Available Tools
As you draw, a sound is played. The bigger the brush, the As you draw, a sound is played. The bigger the brush, the
lower the pitch. lower the pitch.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Stamp (Rubber Stamp) Stamp (Rubber Stamp)
@ -246,7 +247,7 @@ Available Tools
won't display the Mirror, Flip, Shrink and Grow controls for won't display the Mirror, Flip, Shrink and Grow controls for
stamps. See the "Options" documentation.) stamps. See the "Options" documentation.)
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Lines Lines
@ -260,7 +261,7 @@ Available Tools
Let go of the mouse to complete the line. A "sproing!" sound Let go of the mouse to complete the line. A "sproing!" sound
will play. will play.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Shapes Shapes
@ -291,7 +292,7 @@ Available Tools
drawn on the canvas when you let go of the drawn on the canvas when you let go of the
mouse button. (There's no rotation step.) mouse button. (There's no rotation step.)
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Text Text
@ -334,16 +335,15 @@ Available Tools
not include all characters for all languages, not include all characters for all languages,
so sometimes you'll need to change fonts to see so sometimes you'll need to change fonts to see
the characters you're trying to type. the characters you're trying to type.
* Japanese - Romanized Hiragana and
* Japanese -- Romanized Hiragana and Romanized Katakana - right [Alt]
Romanized Katakana -- right [Alt] * Korean - Hangul 2-Bul - right [Alt] or
* Korean -- Hangul 2-Bul -- right [Alt] or
left [Alt] left [Alt]
* Traditional Chinese -- right [Alt] or * Traditional Chinese - right [Alt] or
left [Alt] left [Alt]
* Thai -- right [Alt] * Thai - right [Alt]
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Magic (Special Effects) Magic (Special Effects)
@ -356,7 +356,7 @@ Available Tools
Each 'Magic' tool's instructions are contained within the Each 'Magic' tool's instructions are contained within the
"magic-docs" folder. "magic-docs" folder.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Eraser Eraser
@ -375,7 +375,7 @@ Available Tools
As you erase, a "squeaky clean" eraser/wiping sound is As you erase, a "squeaky clean" eraser/wiping sound is
played. played.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Other Controls Other Controls
@ -387,7 +387,7 @@ Available Tools
Note: You can also press [Control]-[Z] on the keyboard to Note: You can also press [Control]-[Z] on the keyboard to
undo. undo.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Redo Redo
@ -400,7 +400,7 @@ Available Tools
Note: You can also press [Control]-[R] on the keyboard to Note: You can also press [Control]-[R] on the keyboard to
redo. redo.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
New New
@ -425,7 +425,7 @@ Available Tools
overwrite the original 'Starter,' so you can use it again overwrite the original 'Starter,' so you can use it again
later). later).
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Open Open
@ -461,7 +461,7 @@ Available Tools
Note: You can also press [Control]-[O] on the keyboard to Note: You can also press [Control]-[O] on the keyboard to
get the 'Open' dialog. get the 'Open' dialog.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Save Save
@ -487,7 +487,7 @@ Available Tools
Note: You can also press [Control]-[S] on the keyboard to Note: You can also press [Control]-[S] on the keyboard to
save. save.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Print Print
@ -597,7 +597,7 @@ Available Tools
See the "Options" documentation.) See the "Options" documentation.)
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Slides (under "Open") Slides (under "Open")
@ -616,7 +616,7 @@ Available Tools
A sliding scale at the lower left of the screen (next to the A sliding scale at the lower left of the screen (next to the
"Play" button) can be used to adjust the speed of the "Play" button) can be used to adjust the speed of the
slideshow, from slowest to fastest. Choose the leftmost slideshow, from slowest to fastest. Choose the leftmost
setting to disable automatic advancement -- you will need to setting to disable automatic advancement - you will need to
press a key or click to go to the next slide (see below). press a key or click to go to the next slide (see below).
Note: The slowest setting does not automatically advance Note: The slowest setting does not automatically advance
@ -682,7 +682,7 @@ Available Tools
be used to turn on sounds when the parent/teacher wants them be used to turn on sounds when the parent/teacher wants them
disabled.) disabled.)
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Loading Other Pictures into Tux Paint Loading Other Pictures into Tux Paint
@ -784,7 +784,6 @@ Doing it Manually
Calculating the height of Tux Paint's canvas requires multiple Calculating the height of Tux Paint's canvas requires multiple
steps: steps:
1. Take the height of the window (e.g, 480, 600 or 768 pixels) and 1. Take the height of the window (e.g, 480, 600 or 768 pixels) and
subtract 144 subtract 144
2. Take the result of Step 1 and divide it by 48 2. Take the result of Step 1 and divide it by 48
@ -794,25 +793,21 @@ Doing it Manually
5. Finally, take the result of Step 4 and add 40 5. Finally, take the result of Step 4 and add 40
Example: Tux Paint running at fullscreen on a 1440x900 display. Example: Tux Paint running at fullscreen on a 1440x900 display.
* The canvas width is simply 1440 - 192, or 1248. * The canvas width is simply 1440 - 192, or 1248.
* The canvas height is calculated as: * The canvas height is calculated as:
1. 900 - 144, or 756 1. 900 - 144, or 756
2. 756 / 48, or 15.75 2. 756 / 48, or 15.75
3. 15.75 rounded down, or 15 3. 15.75 rounded down, or 15
4. 15 * 48, or 720 4. 15 * 48, or 720
5. 720 + 40, or 760 5. 720 + 40, or 760
So the canvas within a 1440x900 Tux Paint window is 1248x760. So the canvas within a 1440x900 Tux Paint window is 1248x760.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
Further Reading Further Reading
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") * "Magic" Tool Documentation ("magic-docs")
Documentation for each of the currently-installed "Magic" tools. Documentation for each of the currently-installed "Magic" tools.
* AUTHORS.txt * AUTHORS.txt
@ -834,7 +829,7 @@ Doing it Manually
* SVG.txt * SVG.txt
Notes on creating SVG format vector images for use in Tux Paint. Notes on creating SVG format vector images for use in Tux Paint.
-------------------------------------------------------------------------- ----------------------------------------------------------------------
How to Get Help How to Get Help

View file

@ -11,7 +11,7 @@ alink="#FF00FF">
alt="Tux&nbsp;Paint"><br> alt="Tux&nbsp;Paint"><br>
version version
0.9.20 0.9.21
<br> <br>
Advanced Stamps HOWTO</h1> Advanced Stamps HOWTO</h1>
@ -21,7 +21,7 @@ New Breed Software</p>
<p><a href="mailto:albert@users.sf.net">albert@users.sf.net</a><br> <p><a href="mailto:albert@users.sf.net">albert@users.sf.net</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>March 8, 2006 - February 28, 2008</p> <p>March 8, 2006 - July 7, 2008</p>
</center> </center>

View file

@ -12,7 +12,7 @@ alt="Tux&nbsp;Paint"><br>
version version
0.9.20 0.9.21
<br> <br>
Extending Tux Paint</h1> Extending Tux Paint</h1>
@ -23,7 +23,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>June 14, 2002 - March 27, 2008</p> <p>June 14, 2002 - July 7, 2008</p>
</center> </center>
<hr size=2 noshade> <hr size=2 noshade>

View file

@ -11,7 +11,7 @@ alink="#FF00FF">
alt="Tux&nbsp;Paint"><br> alt="Tux&nbsp;Paint"><br>
version version
0.9.20 0.9.21
<br> <br>
Frequently Asked Questions</h1> Frequently Asked Questions</h1>
@ -22,7 +22,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>September 14, 2002 - February 28, 2008</p> <p>September 14, 2002 - July 7, 2008</p>
</center> </center>
<h2>Drawing-related</h2> <h2>Drawing-related</h2>

View file

@ -11,7 +11,7 @@ alink="#FF00FF">
version version
0.9.20 0.9.21
</h1> </h1>
<h2>Options Documentation</h2> <h2>Options Documentation</h2>
@ -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>April 5, 2008</p> <p>July 7, 2008</p>
</center> </center>

View file

@ -12,7 +12,7 @@ alt="Tux&nbsp;Paint"><br>
version version
0.9.20 0.9.21
</h1> </h1>
<h3>A simple drawing program for children</h3> <h3>A simple drawing program for children</h3>
@ -25,7 +25,7 @@ New Breed Software</p>
<p>June 14, 2002 - <p>June 14, 2002 -
March 27, 2008</p> July 7, 2008</p>
</center> </center>

View file

@ -4,7 +4,7 @@
blackAndWhite, Convert the image to greyscale or threshold it into pure black and pure white blackAndWhite, Convert the image to greyscale or threshold it into pure black and pure white
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: June 6, 2008 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -203,3 +203,11 @@ int blackAndWhite_requires_colors(magic_api * api, int which)
return 0; return 0;
} }
void blackAndWhite_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void blackAndWhite_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: May 6, 2008 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -320,3 +320,12 @@ int blocks_chalk_drip_requires_colors(magic_api * api ATTRIBUTE_UNUSED, int whic
{ {
return 0; return 0;
} }
void blocks_chalk_drip_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void blocks_chalk_drip_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Blur Magic Tool Plugin Blur Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -25,7 +25,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 7, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -205,3 +205,11 @@ int blur_requires_colors(magic_api * api, int which)
return 0; return 0;
} }
void blur_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void blur_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
blurAll, Blur the whole image blurAll, Blur the whole image
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: June 6, 2008 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -186,3 +186,11 @@ int blurAll_requires_colors(magic_api * api, int which)
return 0; return 0;
} }
void blurAll_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void blurAll_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -6,7 +6,7 @@
Albert Cahalan <albert@users.sf.net> Albert Cahalan <albert@users.sf.net>
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -25,7 +25,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 18, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -293,3 +293,12 @@ static void do_brick(magic_api * api, SDL_Surface * canvas,
api->playsound(brick_snd, (x * 255) / canvas->w, 255); api->playsound(brick_snd, (x * 255) / canvas->w, 255);
} }
void bricks_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void bricks_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Calligraphy Magic Tool Plugin Calligraphy Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 21, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -420,3 +420,11 @@ static float calligraphy_dist(float x1, float y1, float x2, float y2)
return d; return d;
} }
void calligraphy_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void calligraphy_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Cartoon Magic Tool Plugin Cartoon Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 21, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -223,3 +223,11 @@ int cartoon_requires_colors(magic_api * api, int which)
return 0; return 0;
} }
void cartoon_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void cartoon_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Distortion Magic Tool Plugin Distortion Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: October 24, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -226,3 +226,11 @@ static void distortion_line_callback(void * ptr, int which,
} }
} }
void distortion_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void distortion_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Emboss Magic Tool Plugin Emboss Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 7, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -179,3 +179,11 @@ int emboss_requires_colors(magic_api * api, int which)
return 0; return 0;
} }
void emboss_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void emboss_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Fade and Darken Magic Tools Plugin Fade and Darken Magic Tools Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: May 6, 2008 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -230,3 +230,12 @@ int fade_darken_requires_colors(magic_api * api ATTRIBUTE_UNUSED, int which ATTR
{ {
return 0; return 0;
} }
void fade_darken_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void fade_darken_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Fill Magic Tool Plugin Fill Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -27,7 +27,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 7, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -246,3 +246,11 @@ static void do_flood_fill(magic_api * api, SDL_Surface * canvas, int x, int y,
} }
} }
void fill_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void fill_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Flower Magic Tool Plugin Flower Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 21, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -594,3 +594,11 @@ static void flower_colorize_petals(magic_api * api)
SDL_UnlockSurface(flower_petals); SDL_UnlockSurface(flower_petals);
} }
void flower_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void flower_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Foam Magic Tool Plugin Foam Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 21, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -417,3 +417,11 @@ int foam_requires_colors(magic_api * api, int which)
return 0; /* FIXME: Would be nice to tint the bubbles */ return 0; /* FIXME: Would be nice to tint the bubbles */
} }
void foam_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void foam_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Glass Tile Magic Tool Plugin Glass Tile Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 21, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -279,3 +279,11 @@ int glasstile_requires_colors(magic_api * api, int which)
return 0; return 0;
} }
void glasstile_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void glasstile_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -5,7 +5,7 @@
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
by Albert Cahalan <albert@users.sf.net> by Albert Cahalan <albert@users.sf.net>
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -24,7 +24,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 18, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -244,3 +244,11 @@ static int log2int(int x)
return y; return y;
} }
void grass_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void grass_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Kaleidoscope Magic Tool Plugin Kaleidoscope Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: November 21, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -164,3 +164,11 @@ int kalidescope_requires_colors(magic_api * api, int which)
return 1; return 1;
} }
void kalidescope_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void kalidescope_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Light Magic Tool Plugin Light Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 21, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -207,3 +207,11 @@ int light_requires_colors(magic_api * api, int which)
return 1; return 1;
} }
void light_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void light_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Metal Paint Magic Tool Plugin Metal Paint Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 7, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -173,3 +173,11 @@ int metalpaint_requires_colors(magic_api * api, int which)
return 1; return 1;
} }
void metalpaint_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void metalpaint_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Mirror and Flip Magic Tools Plugin Mirror and Flip Magic Tools Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: October 29, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -198,3 +198,11 @@ int mirror_flip_requires_colors(magic_api * api, int which)
return 0; return 0;
} }
void mirror_flip_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void mirror_flip_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Negative Magic Tool Plugin Negative Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 7, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -163,3 +163,11 @@ int negative_requires_colors(magic_api * api, int which)
return 0; return 0;
} }
void negative_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void negative_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Rainbow Magic Tool Plugin Rainbow Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 7, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -193,3 +193,11 @@ int rainbow_requires_colors(magic_api * api, int which)
return 0; return 0;
} }
void rainbow_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void rainbow_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Ripples Magic Tool Plugin Ripples Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 7, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -177,3 +177,11 @@ int ripples_requires_colors(magic_api * api, int which)
return 0; return 0;
} }
void ripples_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void ripples_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Sharpen, Trace Contour and Silhouette Magic Tool Plugin Sharpen, Trace Contour and Silhouette Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: June 6, 2008 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -266,3 +266,11 @@ int sharpen_requires_colors(magic_api * api, int which)
return 0; return 0;
} }
void sharpen_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void sharpen_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Shift Magic Tool Plugin Shift Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: November 21, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -322,3 +322,12 @@ int shift_requires_colors(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_
{ {
return 0; return 0;
} }
void shift_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void shift_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -5,7 +5,7 @@
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
by Albert Cahalan <albert@users.sf.net> by Albert Cahalan <albert@users.sf.net>
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -24,7 +24,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 7, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -172,3 +172,11 @@ int smudge_requires_colors(magic_api * api, int which)
return 0; return 0;
} }
void smudge_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void smudge_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Tint Magic Tool Plugin Tint Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 7, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -178,3 +178,11 @@ int tint_requires_colors(magic_api * api, int which)
return 1; return 1;
} }
void tint_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void tint_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -4,7 +4,7 @@
Waves Magic Tool Plugin Waves Magic Tool Plugin
Tux Paint - A simple drawing program for children. Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
Last updated: August 7, 2007 Last updated: July 7, 2008
$Id$ $Id$
*/ */
@ -154,3 +154,10 @@ int waves_requires_colors(magic_api * api, int which)
return 0; return 0;
} }
void waves_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
}
void waves_switchout(magic_api * api, int which, SDL_Surface * canvas)
{
}

View file

@ -22,7 +22,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
June 14, 2002 - May 28, 2008 June 14, 2002 - July 7, 2008
$Id$ $Id$
*/ */
@ -902,6 +902,8 @@ typedef struct magic_funcs_s {
void (*click)(magic_api *, int, SDL_Surface *, SDL_Surface *, int, int, SDL_Rect *); void (*click)(magic_api *, int, SDL_Surface *, SDL_Surface *, int, int, SDL_Rect *);
void (*drag)(magic_api *, int, SDL_Surface *, SDL_Surface *, int, int, int, int, SDL_Rect *); void (*drag)(magic_api *, int, SDL_Surface *, SDL_Surface *, int, int, int, int, SDL_Rect *);
void (*release)(magic_api *, int, SDL_Surface *, SDL_Surface *, int, int, SDL_Rect *); void (*release)(magic_api *, int, SDL_Surface *, SDL_Surface *, int, int, SDL_Rect *);
void (*switchin)(magic_api *, int, SDL_Surface *, SDL_Surface *);
void (*switchout)(magic_api *, int, SDL_Surface *, SDL_Surface *);
} magic_funcs_t; } magic_funcs_t;
@ -16871,6 +16873,16 @@ void load_magic_plugins(void)
magic_funcs[num_plugin_files].release = magic_funcs[num_plugin_files].release =
SDL_LoadFunction(magic_handle[num_plugin_files], funcname); SDL_LoadFunction(magic_handle[num_plugin_files], funcname);
snprintf(funcname, sizeof(funcname), "%s_%s", objname,
"switchin");
magic_funcs[num_plugin_files].switchin =
SDL_LoadFunction(magic_handle[num_plugin_files], funcname);
snprintf(funcname, sizeof(funcname), "%s_%s", objname,
"switchout");
magic_funcs[num_plugin_files].switchout =
SDL_LoadFunction(magic_handle[num_plugin_files], funcname);
#ifdef DEBUG #ifdef DEBUG
printf("get_tool_count = 0x%x\n", printf("get_tool_count = 0x%x\n",
(int) magic_funcs[num_plugin_files].get_tool_count); (int) magic_funcs[num_plugin_files].get_tool_count);
@ -16896,6 +16908,10 @@ void load_magic_plugins(void)
(int) magic_funcs[num_plugin_files].drag); (int) magic_funcs[num_plugin_files].drag);
printf("release = 0x%x\n", printf("release = 0x%x\n",
(int) magic_funcs[num_plugin_files].release); (int) magic_funcs[num_plugin_files].release);
printf("switchin = 0x%x\n",
(int) magic_funcs[num_plugin_files].switchin);
printf("switchout = 0x%x\n",
(int) magic_funcs[num_plugin_files].switchout);
#endif #endif
err = 0; err = 0;
@ -16960,6 +16976,18 @@ void load_magic_plugins(void)
fname); fname);
err = 1; err = 1;
} }
if (magic_funcs[num_plugin_files].switchin == NULL)
{
fprintf(stderr, "Error: plugin %s is missing switchin\n",
fname);
err = 1;
}
if (magic_funcs[num_plugin_files].switchout == NULL)
{
fprintf(stderr, "Error: plugin %s is missing switchout\n",
fname);
err = 1;
}
if (magic_funcs[num_plugin_files].drag == NULL) if (magic_funcs[num_plugin_files].drag == NULL)
{ {
fprintf(stderr, "Error: plugin %s is missing drag\n", fprintf(stderr, "Error: plugin %s is missing drag\n",