# \[Semi-OT\] Tux Paint 'Magic' tools becoming plugins

**URL:** <https://discourse.libsdl.org/t/semi-ot-tux-paint-magic-tools-becoming-plugins/14674>\
**Category:** SDL Development\
**Created:** [July 9, 2007, 7:36am UTC](https://discourse.libsdl.org/t/semi-ot-tux-paint-magic-tools-becoming-plugins/14674 "2007-07-09T07:36:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_Kendrick](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@Bill\_Kendrick](https://discourse.libsdl.org/u/Bill_Kendrick)\
**Post date:** [July 9, 2007, 7:36am UTC](https://discourse.libsdl.org/t/semi-ot-tux-paint-magic-tools-becoming-plugins/14674/1 "2007-07-09T07:36:13Z")

</div>

Hot on the heels of the latest release of Tux Paint, I’ve begun adding a  
plugin API that allows the creation of new ‘Magic’ tools. (Things like the  
grass and bricks painters, the blur and smudge effect, etc.) I then yanked  
all of the existing Magic tools out of the core of Tux Paint and converted  
them into plugins.

I’m far from done settling the (current version of the) API, or finishing  
the documentation, but I’m excited by the prospect of people being able  
to more easily contribute new tools to the Tux Paint project, and wanted  
to share with you other SDL programmers (since Tux Paint is in SDL, and  
one would be doing their ‘magical effects’ on an SDL\_Surface :^) )

In fact, I’m eager to see Tux Paint and its new plugin API being utilized  
by computer programming classes (in high schools, for example) as a  
relatively easy and fun way of teaching graphics programming.

So, if I’ve piqued your interest at all, and want to play with (and provide  
feedback on) the current implementation – which I warn you is in flux – then  
go check out the latest Tux Paint source from CVS and have a go!

This page discusses how to pull Tux Paint out of the CVS repository on  
[SourceForge.net](http://SourceForge.net):

[http://www.tuxpaint.org/download/source/cvs/](http://www.tuxpaint.org/download/source/cvs/)

Tux Paint has a number of dependenciesm, of course. If you’ve never  
compiled and installed it from source, you’ll need:

SDL ( [http://www.libsdl.org/](http://www.libsdl.org/) )  
SDL\_mixer ( [http://www.libsdl.org/projects/SDL\_mixer](http://www.libsdl.org/projects/SDL_mixer) ) [optional]  
SDL\_image ( [http://www.libsdl.org/projects/SDL\_image](http://www.libsdl.org/projects/SDL_image) )  
SDL\_ttg ( [http://www.libsdl.org/projects/SDL\_ttf](http://www.libsdl.org/projects/SDL_ttf) )  
libPNG ( [http://www.libpng.org/pub/png/libpng.html](http://www.libpng.org/pub/png/libpng.html) )  
gettext ( [http://www.gnu.org/software/gettext/](http://www.gnu.org/software/gettext/) )  
Cairo ( [http://www.cairographics.org/](http://www.cairographics.org/) ) [optional]  
libRSVG ( [http://librsvg.sourceforge.net/](http://librsvg.sourceforge.net/) ) [optional]  
libpaper ( [http://packages.debian.org/unstable/source/libpaper](http://packages.debian.org/unstable/source/libpaper) )

And don’t forget the development packages, if you’re installing via your  
distro’s package manager. (e.g., get “libsdl1.2” AND “libsdl1.2-devel”)

On Ubuntu Feisty, for example, I believe you need to aptitude install:

libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev  
libpng12-dev libpaper-dev libcairo2-dev libsvg-cairo1-dev librsvg2-dev  
gettext

You might think “can’t I just do ‘apt-get build-dep tuxpaint’”?  
But there’s the new SVG and libpaper stuff in the latest version,  
which is unlikely to be in any distros (besides Debian/sid) right now,  
since the latest version, and hence these new dependencies, is only a  
week old :^)

For folks who just want to look, and not yet touch, you can peek at the  
files via CVSweb:

API header file:  
[http://tuxpaint.cvs.sourceforge.net/](http://tuxpaint.cvs.sourceforge.net/)_checkout_/tuxpaint/tuxpaint/src/tp\_magic\_api.h.in

API documentation:  
[http://tuxpaint.cvs.sourceforge.net/](http://tuxpaint.cvs.sourceforge.net/)_checkout_/tuxpaint/tuxpaint/magic/docs/html/README.html

Example plugin:  
[http://tuxpaint.cvs.sourceforge.net/](http://tuxpaint.cvs.sourceforge.net/)_checkout_/tuxpaint/tuxpaint/magic/docs/tp\_magic\_example.c

Thanks and enjoy!–  
-bill!  
bill at [newbreedsoftware.com](http://newbreedsoftware.com)  
[http://www.newbreedsoftware.com/](http://www.newbreedsoftware.com/)
