Releases: BhavyeMathur/goopylib
1.0.183b15
-
Fixed bug with Polygon Triangulation where the last triangle wasn't added to the list of triangles
-
Added a
copy_obstacles_from()
function to copy the obstacles of another object -
Added object tagging which allows the user to access a GraphicsObject through tags (can be strings, ints, etc.)
-
Objects now store their instances in sets to make the code faster
-
The Animated Image class now calls the
_move()
function of the Image objects and not themove()
function -
Performance Upgrades! tested 2400 frames on test game with cProfile:
FPS increased from ~650 FPS to ~3040 FPS BEFORE:-------------------------- Trial 1: 4.025 secs, 596.273 FPS Trial 2: 3.959 secs, 606.214 FPS Trial 3: 3.663 secs, 655.201 FPS Trial 4: 3.013 secs, 796.548 FPS Trial 5: 3.864 secs, 621.118 FPS Average: 3.705 secs, 647.808 FPS AFTER: -------------------------- Trial 1: 0.871 secs, 2755.454 FPS Trial 2: 0.686 secs, 3498.542 FPS Trial 3: 0.749 secs, 3204.272 FPS Trial 4: 0.928 secs, 2586.207 FPS Trial 5: 0.712 secs, 3370.787 FPS Average: 0.789 secs, 3041.054 FPS
-
The _BBox objects'
is_clicked()
functions run about 2841.3% (~285x) faster faster! -
Added
get_height()
andget_width()
functions to the Polygon class -
The Polygon
get_height()
andget_width()
functions no longer recalculate the height & width -
Reorganized the if statement arguments to reduce processing time in the
_on_mouse_motion()
function -
Transform class
screen()
function now returns a float object -
The GraphicsObject doesn't iterate through all the objects now, only the ones that are required to improve performance
1.0.172b14
-
Added a
set_enabled()
function to the CycleButton class -
Added layering functions to the CycleButton class to override the behaviour of state objects
-
The Image & Animated Image
__repr__()
functions now return a shorter string with the smallest filepath -
Fixed code to change the value of the object layer when the
set_layer()
function is called -
The layering system now checks if an object has been drawn before drawing it on top
-
Performance upgrades (on test code, update time from 0.0008 secs to 0.0003) to the layering system
-
More Performance upgrades to stop the unnecessary redrawing of Graphics Objects (on test code, update time from 0.0003 secs to .00013 secs)
-
Changed all lists in constants.py to be sets to increase performance (wiki.python.org)
-
Changed the directional move functions to correctly align with intuitive axes (forward being up, not down)
-
Image rotation now happens clockwise instead of anticlockwise
-
Added a
set_movement_bounds()
method to the GraphicsObject class to confine the movement of an object -
Added a
destroy()
function to the GraphicsObject class to completely remove an object -
Added object rotation for Polygons
-
Added the ear clipping triangulation algorithm to goopylib.math
-
The GraphWin functions that don't return anything now return self
-
The GraphWin's
set_coords()
function no longer redraws the window if autoflush is False -
Added destroy and undraw all instance functions to destroy all of specific GraphicsObjects
-
Fixed the bounds argument to work correctly with the Circle's
is_clicked()
function -
Every GraphicsObject moves & rotates its bounds when the transformation is performed on the object
-
Added Simple Polygonal Bounding Boxes
1.0.158b12
- Added a
set_enabled()
function to the CycleButton class - Added layering functions to the CycleButton class to override the behaviour of state objects
- The Image & Animated Image
__repr__()
functions now return a shorter string with the smallest filepath - Fixed code to change the value of the object layer when the
set_layer()
function is called - The layering system now checks if an object has been drawn before drawing it on top
1.0.153b11
-
Fixed bug with Images rotating twice the amount than they should be
-
The GraphicsObject class now uses a dictionary to store the animation queues
-
Fixed the contrast animation for images to work properly after it wasn't due to an internal bug
-
Added animation functions for Images to change the blur of the image
-
Image blurring & filter functions now work correctly with rotation and other transformations
-
Fixed bug with Image blurring animation functions not using easing correctly
-
Added a layering system to draw graphics in front of and behind others!
-
Added functions for the layering system:
move_up_layer()
,move_down_layer()
,set_layer()
, andget_layer_objects()
-
Added errors to the GraphicsObject class and fixed some errors in the GraphWin class
1.0.144b10
-
Fixed Bug with AnimatedImages with not incrementing the frame when being drawn repeatedly
-
An object no longer rotates if the amount to rotate by is 0 (or if the rotation is already the amount specified)
-
Fixed bug with AnimatedImage redrawing after being undrawn by the user
-
Fixed bug with GraphicsObjects continuing to blink after being undrawn
-
Added some getter functions to the AnimatedImage class:
get_current_frame()
,get_all_frames()
,get_frame()
,get_number_of_frames()
-
Added
decrement_frame()
andset_frame()
functions to the AnimatedImage class -
Added
get_x_pos()
andget_y_pos()
functions to the GraphicsObject class -
Added functions to check if a GraphicsObject is animating or blinking
-
Added functions to check the time left for GraphicsObject animations
-
Replaced the variables for GraphicsObject blinking with a dictionary
-
Added a
number_of_blinks
argument for theanimate_blinking()
function to stop the blinking after some time
1.0.133b9
-
Removed the window parameter from all the GraphicsObjects. To draw, the
draw()
function must be called separately. -
Added the SolidArc class to the imports.py imports
-
Added an
_draw()
function to the SolidArc class -
Fixed the blinking function to work with the Circle GraphicsObject
-
Added functions to the GraphWin check if at least 1 of the keys provided was pressed
-
Performance upgrade for Goopylib when many objects are drawn on the GraphWin
-
GraphWin setter functions only update the window if the window's
autoflush
isTrue
-
The GraphWin doesn't call the
time.time()
function inside theupdate_win()
if it is not gliding -
More Performance Upgrades for the
_on_mouse_motion()
static method for the GraphicsObject (from ~0.05 secs/call to ~0.0 secs) -
Added an AnimationImage GraphicsObject to create Images which go through multiple frames
-
Improved Performance for Animating Images (tested on my Pac-Man game, brought down time for 1 loop cycle from ~0.13 secs to ~0.05 secs)
-
Added a
blink_graphic
to theanimate_blinking()
function to set a specific graphic when blinking rather than just undrawing it (which happens when it is set to None)
1.0.121b8
-
Fixed flashing image bug when rotating and skewing the image at the same time
-
Fixed bug with Image skewing oddly when it is not rotating
-
Added empty skewing functions to the GraphicsObject class to be overriden by subclasses that support it
-
Added Animate Skew functions to the GraphicsObject class
-
Added a
get_contrast()
function to the Image class, and aget_rotation()
function for the GraphicsObject class -
Fixed error strings in the Image class to display the correct error
-
Added animation functions for changing & setting the contrast of Images
1.0.114b7
-
Fixed bug with Images as Button graphics not scaling to fit the Window's Coordinates
-
Removed the
get_size()
function from the Image class and added it to the GraphicsObject class -
Added Errors to the Image class to make sure the user has specified the correct arguments
-
Added flipping functions to the Image class:
flip()
,flip_xy()
,flip_x()
,flip_y()
,transpose()
, &transverse()
-
Added
get_mode()
andget_format()
methods to the Image class -
Fixed the image get size functions to return the size of the PIL image rather than itself (useful for transformations & stuff)
-
Added skewing function to the Image class:
skew()
,skew_x()
,skew_y()
, andscew_xy()
(This was so confusing to implement...) -
Added
set_contrast()
,change_contrast()
,reset_contrast()
, andget_contrast()
functions to the Image object -
The Image now keeps its contrast settings while rotating after the contrast has been changed
1.0.107b6
-
Added functionality to the Arc class which now inherits from the Curved Line class which means it has all the functionality of the line class too!
-
Added an empty Solid Arc class
-
Added the Arc Wiki
-
Performance upgrade to the Image class when drawing it. It no longer updates itself (because it's not required) causing image drawing to be much faster
-
Added
move_forward()
,move_backward()
,move_left()
,move_right()
functions to the GraphicsObject class -
Added
get_screen_width()
andget_screen_height()
function to util.py -
Added
get_cursor()
&get_config_options()
functions to the GraphicsObject class -
All GraphicsObject animation function return themselves
-
Added new animation functions!
animate_change_fill()
andanimate_set_fill()
-
Added a
blend_colour()
function to colours.py to allow for Interpolating between Colours -
Added compatibility for Colours to be performed operations on with floats
-
Fixed bug with the
ease_bounce()
function raising anTypeError
-
Added even more animation functions!
animate_change_outline()
andanimate_set_outline()
-
Added
get_mouse_pos()
andcheck_keys_down
functions to the GraphWin -
The user can now specify if they want duplicate animations and they can give a duplicates metric to specify what a duplicate is
-
Renamed all the arguments for animations such as
Rotation
,Distance
,Colour Change
, etc. to justChange
-
Added a
check_animation_exists()
function to the GraphWin to check if an animation already exists -
Animation functions for changing width:
animate_change_outline_width()
andanimate_set_outline_width()
-
Added axis-based dragging functions with callbacks:
set_draggable_x()
andset_draggable_y()
-
Added
resize_to_fit()
,resize_to_fit_width()
, &resize_to_height()
functions to the image class to resize itself to the size of another object -
Added
resize_width()
andresize_height()
to resize only 1 dimension of the image -
Added a
get_aspect_ratio()
function to the Image class -
Fixed bug in Image class with the image undrawing when resized or the internal
img_PIL
changed. -
Added an option to preserve the aspect ratio of an image while resizing
-
Added an align to image croping to align the image to a certain side/corner
-
Added Errors to the Image class
__init__
function
1.0.83b5
- Added functionality to the Arc class which now inherits from the Curved Line class which means it has all the functionality of the line class too!
- Added an empty Solid Arc class
- Added the Arc Wiki