mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-20 11:40:33 +01:00
[cairo-pattern] Fix color conversion from short to double
We should divide by 65535.0, not 65536.0.
This commit is contained in:
parent
2030490862
commit
956fdfbb62
1 changed files with 4 additions and 4 deletions
|
|
@ -1442,10 +1442,10 @@ _cairo_pattern_acquire_surface (cairo_pattern_t *pattern,
|
|||
cairo_color_t color;
|
||||
|
||||
_cairo_color_init_rgba (&color,
|
||||
src->stops->color.red / 65536.0,
|
||||
src->stops->color.green / 65536.0,
|
||||
src->stops->color.blue / 65536.0,
|
||||
src->stops->color.alpha / 65536.0);
|
||||
src->stops->color.red / 65535.0,
|
||||
src->stops->color.green / 65535.0,
|
||||
src->stops->color.blue / 65535.0,
|
||||
src->stops->color.alpha / 65535.0);
|
||||
|
||||
_cairo_pattern_init_solid (&solid, &color);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue