From 29a5d47b387fc3c48f1edaf65d21c20c5894aa3c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 17 Sep 2014 20:27:48 +0200 Subject: bug fix, reading float ramps now returns floats rather than zeroes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libgamma_native_method.pyx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libgamma_native_method.pyx') diff --git a/src/libgamma_native_method.pyx b/src/libgamma_native_method.pyx index 0fd27ec..1883217 100644 --- a/src/libgamma_native_method.pyx +++ b/src/libgamma_native_method.pyx @@ -584,7 +584,7 @@ def libgamma_native_gamma_rampsf_free(this : int): libgamma_gamma_rampsf_free(item) -def libgamma_native_gamma_rampsf_get(this : int, index : int) -> int: +def libgamma_native_gamma_rampsf_get(this : int, index : int) -> float: ''' Read a stop in a gamma ramp. @@ -594,10 +594,10 @@ def libgamma_native_gamma_rampsf_get(this : int, index : int) -> int: ''' cdef void* address = this cdef float* ramp = address - return int(ramp[index]) + return float(ramp[index]) -def libgamma_native_gamma_rampsf_set(this : int, index : int, value : int): +def libgamma_native_gamma_rampsf_set(this : int, index : int, value : float): ''' Modify a stop in a gamma ramp. @@ -655,7 +655,7 @@ def libgamma_native_gamma_rampsd_free(this : int): libgamma_gamma_rampsd_free(item) -def libgamma_native_gamma_rampsd_get(this : int, index : int) -> int: +def libgamma_native_gamma_rampsd_get(this : int, index : int) -> float: ''' Read a stop in a gamma ramp. @@ -665,10 +665,10 @@ def libgamma_native_gamma_rampsd_get(this : int, index : int) -> int: ''' cdef void* address = this cdef double* ramp = address - return int(ramp[index]) + return float(ramp[index]) -def libgamma_native_gamma_rampsd_set(this : int, index : int, value : int): +def libgamma_native_gamma_rampsd_set(this : int, index : int, value : float): ''' Modify a stop in a gamma ramp. -- cgit v1.2.3-70-g09d2