Graphics Library for Python
Project description
Processing Python
Processing Python is a powerful and easy-to-use Graphics Library for Python based on Processing.
It allows you to draw shapes in a window with simple functions like rect() or line(), design animations using the mouse position and much more.
Installation
Install the processing-py package using pip:
pip install processing-py
How to use
from processing_py import *
app = App(600,400) # create window: width, height
app.background(255,0,0) # set background: red, green, blue
app.redraw() # refresh the window
#app.exit() # close the window
Drawing
from processing_py import *
app = App(600,400) # create window: width, height
app.background(0,0,0) # set background: red, green, blue
app.fill(255,255,0) # set color for objects: red, green, blue
app.rect(100,100,200,100) # draw a rectangle: x0, y0, size_x, size_y
app.fill(0,0,255) # set color for objects: red, green, blue
app.ellipse(300,200,50,50) # draw a circle: center_x, center_y, size_x, size_y
app.redraw() # refresh the window
Mouse & Animation
from processing_py import *
app = App(600,400) # create window: width, height
while(True):
app.background(0,0,0) # set background: red, green, blue
app.fill(255,255,0) # set color for objects: red, green, blue
app.ellipse(app.mouseX,app.mouseY,50,50) # draw a circle: center_x, center_y, size_x, size_y
app.redraw() # refresh the window
More functions
Explore all the possibilities in the Processing Reference.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
processing_py-0.3.0.tar.gz
(125.8 MB
view hashes)
Built Distribution
processing_py-0.3.0-py3-none-any.whl
(126.4 MB
view hashes)
Close
Hashes for processing_py-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39da5f635546d32cb0e4fa38a316eca35de40ed5ba33496a15439a7ba8522070 |
|
MD5 | 804980a1f769620145efcd9592138a7a |
|
BLAKE2b-256 | 8fcd24249d8f24a8c33a55eac6b7c6ed6c7861cb070c8965d1e74c6fb6e85cbd |