mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 22:48:07 +02:00
gl: generate correct gradient color texture
Pixman generates gradient color at the center of pixel. We need to adjust such accordingly in GL when generating gradient texture
This commit is contained in:
parent
6938592ec7
commit
64a236246b
1 changed files with 2 additions and 2 deletions
|
|
@ -124,9 +124,9 @@ _cairo_gl_gradient_render (const cairo_gl_context_t *ctx,
|
|||
pixman_stops[i].color.alpha = stops[i].color.alpha_short;
|
||||
}
|
||||
|
||||
p1.x = 0;
|
||||
p1.x = _cairo_fixed_16_16_from_double (0.5);
|
||||
p1.y = 0;
|
||||
p2.x = width << 16;
|
||||
p2.x = _cairo_fixed_16_16_from_double (width - 0.5);
|
||||
p2.y = 0;
|
||||
|
||||
gradient = pixman_image_create_linear_gradient (&p1, &p2,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue