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

What's new since v1.0?

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

Screenshot

Related links

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

Downloads

Copyright notice

  • This code is Public Domain.

Comment this project:

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

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

suggestions or tips would be greatly appreciated

master chief 2009-12-17 04:18:24

my program has to be very simmilar to this, only mine must have a theme. I also need stickers from that theme which can be applided to the drawing. Im thinking of doing a modern warfare 2 theme

master chief 2009-12-17 04:14:26

how do you get a spray paint effect

master chief 2009-12-17 04:13:10

im making a paint program for my comp sci class(python) got any ideas