summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/aux.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/aux.py b/src/aux.py
index 4645f85..b2d99fd 100644
--- a/src/aux.py
+++ b/src/aux.py
@@ -22,8 +22,8 @@ def translate_to_integers():
'''
Translate the curves from float to integer
- @param :(list<int>, list<int>, list<int>) The red curve, the green curve and,
- the blue curve mapped to integers
+ @param :(r:list<int>, g:list<int>, b:list<int>) The red curve, the green curve and,
+ the blue curve mapped to integers
'''
R_curve, G_curve, B_curve = [0] * i_size, [0] * i_size, [0] * i_size
for i_curve, o_curve in ((r_curve, R_curve), (g_curve, G_curve), (b_curve, B_curve)):
@@ -38,10 +38,10 @@ def ramps_to_function(r, g, b):
'''
Convert a three colour curves to a function that applies those adjustments
- @param r:int The red colour curves as [0, 65535] integers
- @param g:int The green colour curves as [0, 65535] integers
- @param b:int The blue colour curves as [0, 65535] integers
- @return :()→void Function to invoke to apply the curves that the parameters [r, g and b] represents
+ @param r:list<int> The red colour curves as [0, 65535] integers
+ @param g:list<int> The green colour curves as [0, 65535] integers
+ @param b:list<int> The blue colour curves as [0, 65535] integers
+ @return :()→void Function to invoke to apply the curves that the parameters [r, g and b] represents
'''
r = [y / 65535 for y in r]
g = [y / 65535 for y in g]
@@ -53,8 +53,9 @@ def functionise(rgb):
'''
Convert a three colour curves to a function that applies those adjustments
- @param rgb:(:float, :float, :float) The colour curves as [0, 1] values
- @return :()→void Function to invoke to apply the curves that the parameters [r, g and b] represents
+ @param rgb:(r:list<float>, g:list<float>, b:list<float>) The colour curves as [0, 1] values
+ @return :()→void Function to invoke to apply the curves
+ that the parameters [r, g and b] represents
'''
def fcurve(R_curve, G_curve, B_curve):
for curve, cur in curves(R_curve, G_curve, B_curve):
@@ -69,7 +70,7 @@ def store():
'''
Store the current adjustments
- @return :(r:float, g:float, b:float) The colour curves
+ @return :(r:list<float>, g:list<float>, b:list<float>) The colour curves
'''
return (r_curve[:], g_curve[:], b_curve[:])
@@ -78,7 +79,7 @@ def restore(rgb):
'''
Discard any currently applied adjustments and apply stored adjustments
- @param rgb:(r:float, g:float, b:float) The colour curves to restore
+ @param rgb:(r:list<float>, g:list<float>, b:list<float>) The colour curves to restore
'''
(r_curve[:], g_curve[:], b_curve[:]) = rgb