pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
PaintBrush

PaintBrush - 1.0

John Eriksson (wmjoers)

Tags:

Description

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 AdvancedDemo.py you can try out all advanced features and in the SimpleDemo.py you can see how easy it is to use the class.

You start them by "python AdvancedDemo.py" and "python SimpleDemo.py".

Links

Home Page: http://arainyday.se/projects/python/PaintBrush/
Source: http://arainyday.se/projects/python/PaintBrush/PaintBrush_v1.0.zip

Screenshot


click to view original size

Releases

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

Pygame.org account Comments

If you wish to leave a comment with your pygame.org 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 dotdeb.com 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)
Hi,
Sounds like you need a newer pygame. :-)
Happy X-Mas
/John
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/PaintBrush.py", line 147, in set_color
color.a = c.a
December 8, 2009 2:58am - Lee June - nickname: (oyster) - 5/5
whoa, besides paint.net, lets make a paint.py
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!
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Sep 29, 2014

Sep 19, 2014

Sep 17, 2014

Sep 9, 2014

Sep 8, 2014

Sep 7, 2014


Sep 5, 2014

Aug 26, 2014

Aug 21, 2014


Aug 18, 2014

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