summaryrefslogtreecommitdiff
path: root/src/cairo-pattern.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2007-03-13 16:49:42 -0400
committerBehdad Esfahbod <behdad@behdad.org>2007-03-13 16:49:42 -0400
commit9267cb042418250614db83bd3b2dcb0e7615af79 (patch)
tree0f51f60be6ee3017c8a46b2c5d0cdd1d53be376d /src/cairo-pattern.c
parent60502ba3481ea751df6f379e1c38850172826695 (diff)
[cairo-pattern] Use _cairo_color_double_to_short() to fix color conversion
Diffstat (limited to 'src/cairo-pattern.c')
-rw-r--r--src/cairo-pattern.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index c8e74de22..7cd033ca0 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -684,10 +684,10 @@ _cairo_pattern_add_color_stop (cairo_gradient_pattern_t *pattern,
new_stops[i].x = x;
- new_stops[i].color.red = red * 65535.0;
- new_stops[i].color.green = green * 65535.0;
- new_stops[i].color.blue = blue * 65535.0;
- new_stops[i].color.alpha = alpha * 65535.0;
+ new_stops[i].color.red = _cairo_color_double_to_short (red);
+ new_stops[i].color.green = _cairo_color_double_to_short (green);
+ new_stops[i].color.blue = _cairo_color_double_to_short (blue);
+ new_stops[i].color.alpha = _cairo_color_double_to_short (alpha);
pattern->n_stops++;
}