PaintBrush v1.1

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.

About the Demos

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

What's new since v1.0?

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.


Related links

  • Python - The python programming language.
  • PyGame - Game development for Python.


Copyright notice

  • This code is Public Domain.

Comment this project:

Your name:
Your email (hidden):
Enter the validation code :
Private! (visible for webmaster only)

cve4me 2011-10-27 20:48:20

Have been looking for this for years. will enjoy using it.

steelman 2011-04-12 16:49:35

I think PyntBrush looks more familiar ;-) And remember that Microsoft's Paint for Windows 3.x was named Paintbrush

Best regards,

Zachariah Callaway 2011-03-01 17:53:33

A .deb package of Paint Brush is available at in the Graphics section.

Rick Gibson 2010-03-12 14:45:36

Great program thanks for spending the time to develop this application.
The python demos were really a nice surprise.

Only wish the application had an easy way to draw shapes.
Still looking for a Kolourpaint replacement don't want to install the heavy KDE library.



It's really not that hard to implement shapes.
As long as you can get the shape into separate points you can always use the paint_from (for the first point) and paint_to (for the rest of the points) to draw that shape.

If I can find the time I'll try to add a demo showing this as well.

Best Regards
/John Eriksson

master chief 2009-12-17 03:19:38

suggestions or tips would be greatly appreciated

View all