mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-06-04 06:18:20 +02:00
[gl] Fix create_gradient_texture to premultiply alpha.
This commit is contained in:
parent
31e706454b
commit
05b18fc09a
1 changed files with 3 additions and 0 deletions
|
|
@ -1025,6 +1025,9 @@ _cairo_gl_create_gradient_texture (cairo_gl_context_t *ctx,
|
|||
|
||||
cairo_pattern_get_color_stop_rgba (&pattern->base, i,
|
||||
&offset, &r, &g, &b, &a);
|
||||
r = r * a;
|
||||
g = g * a;
|
||||
b = b * a;
|
||||
stop_index = (stops[i].offset - *first_offset) / delta_offsets * tex_width;
|
||||
if (stop_index == tex_width)
|
||||
stop_index = tex_width - 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue