summaryrefslogtreecommitdiffstats
path: root/src/aux.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-19 03:46:33 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-19 03:46:33 +0100
commit77a66a3eb8eac7a446285dc3ac7580b3f14d990c (patch)
tree61bd0c4ed7c822b305346014bab46e296d901b4e /src/aux.py
parentupdate todo (diff)
downloadblueshift-77a66a3eb8eac7a446285dc3ac7580b3f14d990c.tar.gz
blueshift-77a66a3eb8eac7a446285dc3ac7580b3f14d990c.tar.bz2
blueshift-77a66a3eb8eac7a446285dc3ac7580b3f14d990c.tar.xz
fix data types in documentation
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/aux.py')
-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