Skip to content

Commit 5352712

Browse files
committed
Version 1.1.159-176
* You can now use the `set_text()` function for `Entry` objects even if the `Entry` hasn't been drawn * Fixed the `RandomColourRGB()` function to no longer raise errors if the user hasn't specified the RGB values * Optimized the error checking in the `RandomColourRGB()` & `RandomGreyscale()` functions by reducing the number of `not` & `!=` * Simplified the `RandomColourCMYK()` function and optimized it like with the `RandomColourRGB()` one * The `RandomColourHex()` function now works if the user hasn't supplied hex values for r, g, & b and optimized the function to execute faster * Added a new lists to contain all of `GREENS`, `PURPLES`, etc. and for `WARM COLOURS` and `COOL COLOURS` * Added a list of all goopylib colours objects * Added HSV colours to goopylib: a `ColourHSV` class & `RandomColourHSV()` function * Changed all the `GraphicsError`s in `colours.py` to be raised with a `"GraphicsError:"` prefix * The `ColourCMYK` class is now printed as `"cmyk c%, m%, y%, k%"` rather than the previous `"cmyk c, m, y, k"` * The Internal goopylib classes no longer use the `Point` class in favour of an iterable * Added a few more (7) colour definitions to complete the existing colour scales * Added HSL colours to goopylib: a `ColourHSL` class & `RandomColourHSL()` function * Renamed all the functions inside `colours.py` to follow the Python naming convention * Added American spelling (`color`) equivalents of everything in `colours.py` which references the original functions * Renamed the `blend_BLENDINGTYPE()` functions to `blend_colour_BLENDINGTYPE()` and added their American equivalents. * Moved the `random` module's import statement above the `goopylib.math.Interpolations` import statement in `colours.py` to abide by PEP8 * Created a `color.py` file which simply imports everything from `colours.py`
1 parent e53ad8b commit 5352712

File tree

6 files changed

+487
-122
lines changed

6 files changed

+487
-122
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,36 @@ https://stackoverflow.com/questions/63978464/error-when-compiling-cpython-cannot
206206
There are probably still a lot of bugs in the release version, but I moved onto Version 1.1 because I started working
207207
on converting goopylib code to Cython C and also building a Sound Engine for goopylib 1.2
208208

209+
#### 1.1.176-alpha19 4th-27th November 2020
210+
211+
* You can now use the `set_text()` function for `Entry` objects even if the `Entry` hasn't been drawn
212+
* Fixed the `RandomColourRGB()` function to no longer raise errors if the user hasn't specified the RGB values
213+
* Optimized the error checking in the `RandomColourRGB()` & `RandomGreyscale()` functions by reducing the number of
214+
`not` & `!=`
215+
216+
* Simplified the `RandomColourCMYK()` function and optimized it like with the `RandomColourRGB()` one
217+
* The `RandomColourHex()` function now works if the user hasn't supplied hex values for r, g, & b and optimized the
218+
function to execute faster
219+
220+
* Added a new lists to contain all of `GREENS`, `PURPLES`, etc. and for `WARM COLOURS` and `COOL COLOURS`
221+
* Added a list of all goopylib colours objects
222+
223+
* Added HSV colours to goopylib: a `ColourHSV` class & `RandomColourHSV()` function
224+
* Changed all the `GraphicsError`s in `colours.py` to be raised with a `"GraphicsError:"` prefix
225+
* The `ColourCMYK` class is now printed as `"cmyk c%, m%, y%, k%"` rather than the previous `"cmyk c, m, y, k"`
226+
227+
* The Internal goopylib classes no longer use the `Point` class in favour of an iterable
228+
* Added a few more (7) colour definitions to complete the existing colour scales
229+
* Added HSL colours to goopylib: a `ColourHSL` class & `RandomColourHSL()` function
230+
231+
* Renamed all the functions inside `colours.py` to follow the Python naming convention
232+
* Added American spelling (`color`) equivalents of everything in `colours.py` which references the original functions
233+
* Renamed the `blend_BLENDINGTYPE()` functions to `blend_colour_BLENDINGTYPE()` and added their American equivalents.
234+
235+
* Moved the `random` module's import statement above the `goopylib.math.Interpolations` import statement in `colours.py`
236+
to abide by PEP8
237+
* Created a `color.py` file which simply imports everything from `colours.py`
238+
209239
#### 1.1.158-alpha18 3rd November 2020
210240

211241
* The `is_clicked()` function of the `GraphicsObject` class returns whether or not the object's `bounds` were clicked.

goopylib/_internal_classes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def __repr__(self):
3838

3939
def is_clicked(self, pos):
4040
if pos is not None:
41-
x = pos.x
42-
y = pos.y
41+
x = pos[0]
42+
y = pos[1]
4343
return eval(self.equation)
4444

4545
def check_on_edge(self, pos):

goopylib/applications/custom_ease.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def create_custom_ease():
103103
delete_dropdown = Button(Image(Point(0, 0), f"{path}DeleteDropdown.png"),
104104
Image(Point(0, 0), f"{path}DeleteDropdownHover.png"))
105105

106-
colour_grad = ColourGradient(LIGHTER_VIOLET, DARKEST_VIOLET, 100)
106+
colour_grad = colour_gradient(LIGHTER_VIOLET, DARKEST_VIOLET, 100)
107107

108108
resolution = 2
109109

goopylib/colors.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from goopylib.colours import *

0 commit comments

Comments
 (0)