Package: easygraphics
A Borland Graphics Interface like Grahics library for pythonBorland Graphics Interface, also known
asTurbo 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 licenseDocumentation:https://pyeasygraphics.readthedocs.io/en/latest/Documentation (Chinese Version):http://easygraphics.royqh.netSample programThe following code shows a moving ellipse.fromeasygraphicsimport*defmainloop():x=0set_color(Color.BLUE)set_fill_color(Color.GREEN)whileis_run():x=(x+1)%440ifdelay_jfps(60):clear_device()draw_ellipse(x+100,200,100,100)defmain():init_graph(640,480)set_render_mode(RenderMode.RENDER_MANUAL)mainloop()close_graph()easy_run(main)Special ThanksSome code is taken fromeasygui_qtandqtutils, thanks a lot!History2.0.1.1fix: bug in image.draw_arcremove: flood_fill2.0.0-alpha2optimize: polygon drawing functionschange: we don’t reset pen/brush for each draw_* methodsadd: circle drawing methods to Imageadd some commentsadd: KeyMessage now have type property, to distinguish key release and key press message2.0.0-alpha1turn on anti-alias by defaultremove floodfill() method (slow, and not working with shapes drawn with anti-aliasing. we shouldn’t use it)remove background mask (it’s seldom used and will slow down the drawing speed)set image’s default background color to TRANSPARENT1.0.20add: Image.copy() methodchange: draw_image() add width/height parameters ( can copy image with scale)change: only create direct image buffer view when using floodfill()1.0.19add: Image.scaled() method1.0.18add: put_image()change: capture_screen()’s 3rd and 4th parameter to width and heightadd: more FillStyle consts1.0.17fix: dialogs dosen’t work in normal pyqt programchange: contains_control() -> contains_ctrl()add: load_image() throw value error if the image file is not existfix: get_mouse_msg() / get_char() / get_key() not quit correctly when the graphics window is closed1.0.16add: set_antialiasing()add: contains_control()/contains_alt()/contains_shit()/contains_meta()change: get_mouse_message() now return a MouseMessage objectchange: get_key() now return a KeyMessage object1.0.15change: use queue to store keyboard/mouse messageremove: set_message_outdate_duration()change: now get_message() return 5 results instead of 4add: clear_mouse_msg(), clear_key_msg(), clear_char_msg()add: create_image_from_file()1.0.14fix: processing not workingfix: get_key() and has_kb_msg() not workingadd: set_message_outdate_duration()add: bezier_point and bezier_tangent functionsadd: curve_point and curve_tanget functionsadd more documents and examples1.0.13.1fix: immediate mode not workfix: set_flip_y() dosen’t work when reused after reset_transform()1.0.13add easy_run modenow the easy_run mode is the preferred mode to run easygraphics. It can work under Linux, macOS and windows.1.0.12fix: the drawing is not stopped immediately after the turtle window is closed()1.0.11fix: dialog get_username_password() hangs.fix: dialog get_color() not workfix: dialog show_html()/show_code()/show_text() not work1.0.10add: show_objects() now can show a DataFrame.1.0.9add: enable_sorting parameter in show_objects()1.0.8fix: crash when show_objects() called successively.dialogs will close the auto-started qapplication instance when exception raised.1.0.7fix: show_objects() don’t show non-primitive-type properties correctly1.0.6change: get_open_file_name()/get_file_names()/get_save_file_name() now use native dialogs, to avoid
crash on pyqt >= 5.11.3add: FileFilter const class, and filter parameter in get_open_file_name()/get_file_names()/get_save_file_name()1.0.5add: get_open_file_name() to dialog package.fix: get_open_file_name()/get_file_names()/get_save_file_name() not workchange: get_open_file_name()/get_file_names()/get_save_file_name() return filename(s), instead of tuple1.0.4remove the y-flip setting in ortho_look_at(). If you want to flip y, use set_flip_y() instead1.0.3add: ortho_look_at() function to map 3d point to 2dadd: isometric_projection() function to map 3d point to 2d from 45degree view port1.0.2add: press ctrl+shift+alt+F10 will create a snapshot of the graphics window.The snapshot is saved in the running folder.change: close turtle window will automatically close the animation of turtle moving.1.0.1add: fps settings in easygraphics.processing moduleupdate: translationschange: easygraphics.processing module now use functions in easygraphics modules to draw. (Remove duplication defines.)1.0.0fix: hangs in inactive shell when init_graph again after close_graph()0.10.1add: color_gray() function.change: change lines/polylines/polygon functions parametersadd: curve() / draw_curve() to draw Catmull-Rom splines.add: curve_vertex() to define curve vertices.fix: crash when close_graph() and init_graph() again0.10.0change: 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.24add begin_recording()/add_record()/save_recording()/end_recording() to create animated png files.add ShapeMode constsadd set_ellipse_mode() and set_rect_mode() to Image classadd easygraphics.processing modulefix: 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 subpackageadd begin_shape()/vertex()/bezier_vertex()/quadratic_vertex()/end_shape() function to Image class and easygraphics.processing subpackagechange: bezier()/draw_bezier now use seperate coordinate values as paramter instead of list.add VertexType constsadd: begin_shape() ‘s type parameteradd: end_shape()’s close parameterfix: succesive dialog calls may crash the programadd: fill_image() function to Image class0.9.23fix: frame jumping because of errors in delay_jfps()0.9.22fix: turtle icon position error when translated.fix: hangs when running in qtconsole and spyder0.9.21add: show_lists_table() to display data lists in tableadd: get_transform()/set_transform()/push_transform()/pop_transform()change to BSD licensefix: close graphics window  when drawing in is_run() and delay_fps()/delay_jfps() loops not throw exception0.9.20fix: successive dialog calls may crash program.0.9.19.2fix: license description in readme0.9.19.1fix: license description in setup.py0.9.19change to MIT License0.9.18add ImageWidget and TurtleWidget classes, to embed easygraphics in Qt Applications0.9.17easygraphics.turtle:add: is_out_of_window() to check if the turtle is out of the graphics window0.9.16redefine pause() in turtleredefine is_run() in turtlefix: default turtle speedchange: meaning of the turtle’s move_arc() function’s parametersadd: move_ellipse() function in easygraphics.turtle package0.9.15fix package error in setup.pychange turtle’s default speed to 100.9.14add: move_arc() function to move turtle in arc0.9.13add:  set_fill_rule() / get_fill_rule() function, to control how the polygons
are filled.add:  FillRule constsFinish chinese translations for apis.fix: filling glitches in end_fill()0.9.12Revert 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.11fix: now arc/pie/chord drawing functions has the same angle system with rotate()0.9.10add: easygraphics.turtle package which implements the turtle graphics.change: now rotate()/skew() can transform around any pointchange: now reflect() can using lines not passing the origin as the reflecting axis.0.9.9add set_flip_y() to make y-axis grows bottom-up. (use reflect() will make texts
get reflected too.)0.9.8.1fix: legacy and music subpackage not packed in the binary distributions.0.9.8fix: delay_fps() now work properly in Manual render modefinish chinese translations for tutorials0.9.7add: load_image() to load image from filesadd: to_alpha() to make a transparently colorchange: use Source Over as the default composition mode (the same with Qt)more tutorialsadd: show_table() to display table infomation in a dialogchange: 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.6add: reflection (mirror/flip) and shear (skew) operations.0.9.5add: headless mode support (no graphics window mode, use it to draw pictures)0.9.4add: easygraphics.legacy package to better compatible with old BGI programs.add: get_click() function to get mouse click eventchange: background implementation to make set_background_color() work correctlyadd: now can use name (“red”), color string (“#ff0000), integer color rgb value (0xff0000)in set_color(), set_fill_color(), set_background_color() functionsadd: cymk() and hsv() to get CYMK and HSV format colormore tutorials0.9.3fix : Readme0.9.2add: easygraphics functions can run in the interactive mode (eg. IPython) correctlyadd: dialogs (ineasygraphics.dialogpackage, adopted fromeasygui_qt)add: create and save to/from fileadd image transforms (translate/rotate/scale)add view port supportadd sphinx docsupload docs to readthedocs.org0.9.1add readme textadd delay_fps() and rgb() functions0.9.0add keyboard and mouse message check and handleadd simple dialogs ( from EasyGUI-Qt (https://github.com/aroberge/easygui_qt) and qtutils (https://bitbucket.org/philipstarkey/qtutils))0.1.0First release on github