mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-22 14:00:42 +02:00
glitz: set correct parameters for linear and radial pattern.
Glitz expects 16.16 fixed point, but we use 24.8 fixed point by default.
This commit is contained in:
parent
3bde440e00
commit
449e7518be
1 changed files with 10 additions and 10 deletions
|
|
@ -779,22 +779,22 @@ _cairo_glitz_pattern_acquire_surface (const cairo_pattern_t *pattern,
|
|||
{
|
||||
cairo_linear_pattern_t *grad = (cairo_linear_pattern_t *) pattern;
|
||||
|
||||
params[0] = grad->p1.x;
|
||||
params[1] = grad->p1.y;
|
||||
params[2] = grad->p2.x;
|
||||
params[3] = grad->p2.y;
|
||||
params[0] = _cairo_fixed_to_16_16 (grad->p1.x);
|
||||
params[1] = _cairo_fixed_to_16_16 (grad->p1.y);
|
||||
params[2] = _cairo_fixed_to_16_16 (grad->p2.x);
|
||||
params[3] = _cairo_fixed_to_16_16 (grad->p2.y);
|
||||
attr->filter = GLITZ_FILTER_LINEAR_GRADIENT;
|
||||
}
|
||||
else
|
||||
{
|
||||
cairo_radial_pattern_t *grad = (cairo_radial_pattern_t *) pattern;
|
||||
|
||||
params[0] = grad->c1.x;
|
||||
params[1] = grad->c1.y;
|
||||
params[2] = grad->r1;
|
||||
params[3] = grad->c2.x;
|
||||
params[4] = grad->c2.y;
|
||||
params[5] = grad->r2;
|
||||
params[0] = _cairo_fixed_to_16_16 (grad->c1.x);
|
||||
params[1] = _cairo_fixed_to_16_16 (grad->c1.y);
|
||||
params[2] = _cairo_fixed_to_16_16 (grad->r1);
|
||||
params[3] = _cairo_fixed_to_16_16 (grad->c2.x);
|
||||
params[4] = _cairo_fixed_to_16_16 (grad->c2.y);
|
||||
params[5] = _cairo_fixed_to_16_16 (grad->r2);
|
||||
attr->filter = GLITZ_FILTER_RADIAL_GRADIENT;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue