aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-12-15 21:48:00 +0100
committerMattias Andrée <maandree@kth.se>2016-12-15 21:48:00 +0100
commitfe6a2adbd706725d152bfb2c4e8a9c56dc1d3965 (patch)
tree0f7381ffc4f2a78d4ecdabe598dbe40b0e2518b0
parentm (diff)
downloadlibcolour-fe6a2adbd706725d152bfb2c4e8a9c56dc1d3965.tar.gz
libcolour-fe6a2adbd706725d152bfb2c4e8a9c56dc1d3965.tar.bz2
libcolour-fe6a2adbd706725d152bfb2c4e8a9c56dc1d3965.tar.xz
libcolour_rgb_colour_space: first parameter is of type libcolour_rgb_t*
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--src/libcolour.c8
-rw-r--r--src/libcolour.h2
2 files changed, 4 insertions, 6 deletions
diff --git a/src/libcolour.c b/src/libcolour.c
index 7799534..b6c6e5b 100644
--- a/src/libcolour.c
+++ b/src/libcolour.c
@@ -1082,12 +1082,10 @@ static void get_transfer_function(libcolour_colour_t* cs)
}
-int libcolour_get_rgb_colour_space(libcolour_colour_t* cs_, libcolour_rgb_colour_space_t space)
+int libcolour_rgb_colour_space(libcolour_rgb_t* cs, libcolour_rgb_colour_space_t space)
{
#define XYY(XVALUE, YVALUE) (libcolour_ciexyy_t){ .model = LIBCOLOUR_CIEXYY, .x = XVALUE, .y = YVALUE, .Y = 1}
- libcolour_rgb_t* cs = &cs_->rgb;
-
switch (space) {
case LIBCOLOUR_RGB_COLOUR_SPACE_CUSTOM_FROM_MEASUREMENTS:
if (get_matrices(cs))
@@ -1375,9 +1373,9 @@ int libcolour_get_rgb_colour_space(libcolour_colour_t* cs_, libcolour_rgb_colour
cs->transitioninv = cs->transition * cs->slope;
cs->colour_space = space;
cs->white_r = cs->white_g = cs->white_b = 1;
- if (get_matrices(cs) || libcolour_proper(cs_))
+ if (get_matrices(cs) || libcolour_proper((libcolour_colour_t*)cs))
return -1;
- get_transfer_function(cs_);
+ get_transfer_function((libcolour_colour_t*)cs);
return 0;
#undef XYY
diff --git a/src/libcolour.h b/src/libcolour.h
index 3a8975e..b45b1a4 100644
--- a/src/libcolour.h
+++ b/src/libcolour.h
@@ -291,7 +291,7 @@ double libcolour_srgb_encode(double);
double libcolour_srgb_decode(double);
int libcolour_delta_e(const libcolour_colour_t*, const libcolour_colour_t*, double*);
int libcolour_proper(libcolour_colour_t*);
-int libcolour_get_rgb_colour_space(libcolour_colour_t*, libcolour_rgb_colour_space_t);
+int libcolour_get_rgb_colour_space(libcolour_rgb_t*, libcolour_rgb_colour_space_t);
size_t libcolour_marshal(const libcolour_colour_t*, void*);
size_t libcolour_unmarshal(libcolour_colour_t*, const void*);