pygame is
Simple DirectMedia Layer is
Site Swing

PaintBrush - 1.0

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".


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
May 22, 2016

May 21, 2016

May 18, 2016

May 1, 2016

Mar 27, 2016

Mar 26, 2016

Mar 22, 2016

Mar 19, 2016

Mar 17, 2016

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