From f19e33d560026dde017533dd68c58e1a44648daa Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 19 Mar 2014 03:43:56 +0100 Subject: add store and restore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/aux.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src') diff --git a/src/aux.py b/src/aux.py index cc91ef7..4645f85 100644 --- a/src/aux.py +++ b/src/aux.py @@ -64,3 +64,21 @@ def functionise(rgb): curve[i] = cur[y] return lambda : fcurve(*rgb) + +def store(): + ''' + Store the current adjustments + + @return :(r:float, g:float, b:float) The colour curves + ''' + return (r_curve[:], g_curve[:], b_curve[:]) + + +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 + ''' + (r_curve[:], g_curve[:], b_curve[:]) = rgb + -- cgit v1.2.3-70-g09d2