pygame is
Simple DirectMedia Layer is
Site Swing

PaintBrush - 1.1

John Eriksson (wmjoers)



PaintBrush is NOT an application, it's a public domain class that can be used in various drawing applications or games.

It's really simple to use. You just set a destination surface and a surface to be used as a brush. Then you can set the color and alpha value for that brush. You can also tell the brush to be rotated in the drawing direction.

It's also possible to specify a line pattern to be able to draw dotted lines.

The source package includes two different demos of how to use the PaintBrush class. In the you can try out all advanced features and in the you can see how easy it is to use the class.

You start them by "python" and "python".


The only change is to the help text of the I forgot to add that you can use the right mouse button to draw lines.


Home Page:


click to view original size


PaintBrush - 1.1 - Sep 16, 2009
PaintBrush - 1.0 - Sep 15, 2009 account Comments

If you wish to leave a comment with your account, please sign in first.

September 30, 2011 1:39pm - Zerg - nickname: (imba) - 5/5
its neat and clean
March 1, 2011 12:54pm - Zachariah Callaway - nickname: (xzcallaway)
A .deb package of Paint Brush is available at in the Graphics section.
January 24, 2011 4:24pm - Westley Marti­nez - nickname: (anikom15) - 4/5
Very nice job.
December 24, 2009 3:22am - John Eriksson - nickname: (wmjoers)
Sounds like you need a newer pygame. :-)
Happy X-Mas
December 19, 2009 6:49pm - Per F - nickname: (worldsayshi)
Naturally I forgot the last line:

AttributeError: 'tuple' object has no attribute 'a'
December 19, 2009 6:48pm - Per F - nickname: (worldsayshi)
I get this error when running the samples:

File "Pythonscriptfolder/PaintBrush/lib/", line 147, in set_color
color.a = c.a
December 8, 2009 2:58am - Lee June - nickname: (oyster) - 5/5
whoa, besides, lets make a
October 16, 2009 5:14am - josmiley / Luke spywoker - nickname: (mutualaccount) - 5/5
efficace !
September 15, 2009 11:52am - Rene Dudfield - nickname: (illume) - 5/5
Wow this is awesome!

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Oct 1, 2015

Sep 11, 2015

Sep 6, 2015

Aug 26, 2015

Aug 25, 2015

Aug 21, 2015

Aug 16, 2015

Jul 30, 2015

Jun 24, 2015

... more!
for pygame related questions, comments, and suggestions, please see help (lists, irc)