aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-09-17 20:27:48 +0200
committerMattias Andrée <maandree@operamail.com>2014-09-17 20:27:48 +0200
commit29a5d47b387fc3c48f1edaf65d21c20c5894aa3c (patch)
treeacde45c79f01437f30bcec852323383a12fc4a2c
parentderp (diff)
downloadpylibgamma-29a5d47b387fc3c48f1edaf65d21c20c5894aa3c.tar.gz
pylibgamma-29a5d47b387fc3c48f1edaf65d21c20c5894aa3c.tar.bz2
pylibgamma-29a5d47b387fc3c48f1edaf65d21c20c5894aa3c.tar.xz
bug fix, reading float ramps now returns floats rather than zeroes
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/libgamma_native_method.pyx12
1 files changed, 6 insertions, 6 deletions
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 = <void*><size_t>this
cdef float* ramp = <float*>address
- return int(ramp[<size_t>index])
+ return float(ramp[<size_t>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 = <void*><size_t>this
cdef double* ramp = <double*>address
- return int(ramp[<size_t>index])
+ return float(ramp[<size_t>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.