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

CurveDraw - 0.5

David (animatinator)

Tags:

Description

This is based on my earlier Bézier curves demo, which can be found here.

CurveDraw is a drawing app which uses Bézier curves. It's still in early alpha, and so it's lacking most of the functions I intend to implement (for example saving drawings, duplicating objects, loading images to trace and suchlike).

How to use

CurveDraw works in two modes: object view and editing. You can switch between these using the TAB key (this will enter or exit editing mode for the selected curve object). To create a curve object, right-click in the position you wish to place the first point. The program will automatically switch to editing mode for the new curve object, where you can add new points by right-clicking and move points by dragging. Each point has two control points attached to it, which are used to control the path of the curve.
In object viewing mode, you can select curve objects by clicking on them, and delete selected objects with the delete key. Curve objects can also be dragged around the screen.
To toggle the grid in the background, use the G key.

Changes

Matrix transformations

I've added the beginnings of a transformation module which will be used for transformations such as scale, rotate and shear. At the moment scaling is implemented; press S in object view mode and then move the mouse to scale the selected curve object (pull away from the object to scale up, push in to scale down) and then click to complete the operation.

Closed curve objects

Pressing C in edit mode will toggle whether the curve is closed.

Images can be saved

You can now save the current drawing with CTRL-S (although it just saves to "Test.jpg" in the script's folder at the moment).

Object duplication added

You can duplicate the selected curve object by pressing the D key when in object view mode.

Improved mouse-click detection

Whereas in the previous release you had to click on one of the points on a curve to select it, in this version you can now click anywhere on the curve itself.

Various graphical enhancements

Several improvements have been made to the interface, such as highlighting the curve which is being edited or is selected, highlighting selected control points, and not drawing in points for curves which are not selected in object view mode.

Links

Home Page: http://www.pygame.org
Source: http://uploader.polorix.net//files/123/CurveDraw%281%29.zip

Screenshot


click to view original size

Releases

CurveDraw - 0.5 - Jun 27, 2009
CurveDraw - 0.2 - Jun 25, 2009

Pygame.org account Comments

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

July 22, 2009 1:54pm - David - nickname: (animatinator)
raubana: Thanks :)
jestermon: Nope, no problem. Some (most) bits of the code could maybe do with some tidying though ;-)
July 5, 2009 1:13am - Jess Hill - nickname: (jestermon)
Smoothe. Something I was working on but never got around to with all the other projects. Pypaint will most certainly be gobbling up some more sweet source code.. that is if you dont mind :)
June 30, 2009 2:36pm - Dylan J. Raub - nickname: (dylanjraub) - 5/5
Dude! This is... OH MY GOD! You are a life saver! THANK YOU!
spotlight

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

Jul 22, 2014

Jul 21, 2014

Jul 20, 2014

Jul 19, 2014

Jul 15, 2014

Jul 10, 2014

Jul 9, 2014

Jun 27, 2014



Jun 24, 2014

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