"A TC Graphics style like Graphics Library"
Project description
A Borland Graphics Interface like Grahics library for python
Borland Graphics Interface, also known as Turbo C Graphics, is an easy-to-use graphics library bundled with Turbo C/Turbo C++/Borland C++.
Because it is easy to learn and use, it is very good for using for kids and beginners to learn basic programming , computer graphics.
Free software: BSD license
Documentation: https://pyeasygraphics.readthedocs.io/en/latest/
Documentation (Chinese Version): http://easygraphics.royqh.net
Sample program
from easygraphics import *
def mainloop():
x = 0
set_color(Color.BLUE)
set_fill_color(Color.GREEN)
while is_run():
x = (x + 1) % 440
if delay_jfps(60):
clear_device()
draw_ellipse(x + 100, 200, 100, 100)
init_graph(640, 480)
set_render_mode(RenderMode.RENDER_MANUAL)
mainloop()
close_graph()
Special Thanks
Some code is taken from easygui_qt and qtutils, thanks a lot!
History
0.10.1
add: color_gray() function.
change: change lines/polylines/polygon functions parameters
add: curve() / draw_curve() to draw Catmull-Rom splines.
add: curve_vertex() to define curve vertices.
fix: crash when close_graph() and init_graph() again
0.10.0
change: reimplement close_graph(), simplifies graphics window close event processing.
add: add begin_shape()/vertex()/bezier_vertex()/quadratic_vertex()/end_shape() functions to easygraphics.
0.9.24
add begin_recording()/add_record()/save_recording()/end_recording() to create animated png files.
add ShapeMode consts
add set_ellipse_mode() and set_rect_mode() to Image class
add easygraphics.processing module
fix: Image’s save_settings()/restore_settings() now save most settings.
update: ellipse_mode apply to arc/chord/pie shape drawings.
add quadratic()/draw_quadratic() function to Image class and easygraphics.processing subpackage
add begin_shape()/vertex()/bezier_vertex()/quadratic_vertex()/end_shape() function to Image class and easygraphics.processing subpackage
change: bezier()/draw_bezier now use seperate coordinate values as paramter instead of list.
add VertexType consts
add: begin_shape() ‘s type parameter
add: end_shape()’s close parameter
fix: succesive dialog calls may crash the program
add: fill_image() function to Image class
0.9.23
fix: frame jumping because of errors in delay_jfps()
0.9.22
fix: turtle icon position error when translated.
fix: hangs when running in qtconsole and spyder
0.9.21
add: show_lists_table() to display data lists in table
add: get_transform()/set_transform()/push_transform()/pop_transform()
change to BSD license
fix: close graphics window when drawing in is_run() and delay_fps()/delay_jfps() loops not throw exception
0.9.20
fix: successive dialog calls may crash program.
0.9.19.2
fix: license description in readme
0.9.19.1
fix: license description in setup.py
0.9.19
change to MIT License
0.9.18
add ImageWidget and TurtleWidget classes, to embed easygraphics in Qt Applications
0.9.17
easygraphics.turtle:
add: is_out_of_window() to check if the turtle is out of the graphics window
0.9.16
redefine pause() in turtle
redefine is_run() in turtle
fix: default turtle speed
change: meaning of the turtle’s move_arc() function’s parameters
add: move_ellipse() function in easygraphics.turtle package
0.9.15
fix package error in setup.py
change turtle’s default speed to 10
0.9.14
add: move_arc() function to move turtle in arc
0.9.13
add: set_fill_rule() / get_fill_rule() function, to control how the polygons are filled.
add: FillRule consts
Finish chinese translations for apis.
fix: filling glitches in end_fill()
0.9.12
Revert 0.9.11 ‘s angle system change. Keep arc/pie/chord compatible with BGI.
add show_image() function, to display drawings in the jupyter qtconsole or notebook.
add show_image_dialog() function, to display a qimage in the dialog.
0.9.11
fix: now arc/pie/chord drawing functions has the same angle system with rotate()
0.9.10
add: easygraphics.turtle package which implements the turtle graphics.
change: now rotate()/skew() can transform around any point
change: now reflect() can using lines not passing the origin as the reflecting axis.
0.9.9
add set_flip_y() to make y-axis grows bottom-up. (use reflect() will make texts get reflected too.)
0.9.8.1
fix: legacy and music subpackage not packed in the binary distributions.
0.9.8
fix: delay_fps() now work properly in Manual render mode
finish chinese translations for tutorials
0.9.7
add: load_image() to load image from files
add: to_alpha() to make a transparently color
change: use Source Over as the default composition mode (the same with Qt)
more tutorials
add: show_table() to display table infomation in a dialog
change: rename mouse_msg() to has_mouse_msg()
change: rename kb_hit() to has_kb_hit()
change: rename get_mouse() to get_mouse_msg()
change: rename kb_msg() to has_kb_msg()
finish the tutorials.
0.9.6
add: reflection (mirror/flip) and shear (skew) operations.
0.9.5
add: headless mode support (no graphics window mode, use it to draw pictures)
0.9.4
add: easygraphics.legacy package to better compatible with old BGI programs.
add: get_click() function to get mouse click event
change: background implementation to make set_background_color() work correctly
- add: now can use name (“red”), color string (“#ff0000), integer color rgb value (0xff0000)
in set_color(), set_fill_color(), set_background_color() functions
add: cymk() and hsv() to get CYMK and HSV format color
more tutorials
0.9.3
fix : Readme
0.9.2
add: easygraphics functions can run in the interactive mode (eg. IPython) correctly
- add: dialogs (in easygraphics.dialog package, adopted from
add: create and save to/from file
add image transforms (translate/rotate/scale)
add view port support
add sphinx docs
upload docs to readthedocs.org
0.9.1
add readme text
add delay_fps() and rgb() functions
0.9.0
add keyboard and mouse message check and handle
add simple dialogs ( from EasyGUI-Qt (https://github.com/aroberge/easygui_qt) and qtutils (https://bitbucket.org/philipstarkey/qtutils))
0.1.0
First release on github
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
Built Distribution
Hashes for easygraphics-0.10.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52168d132cd73d292958cbc737eeb55deb210f10a93617ced8ee239d47cef50e |
|
MD5 | 43dbc07e9b263f79253bc7c0f64d8244 |
|
BLAKE2b-256 | 2cb348d8cfc3b8999373ecb40f2acd411fc2fb802bbaba639f76461d89aeeaa5 |