зеркало из https://github.com/mozilla/gecko-dev.git
Bug 323822 - opacity not affecting gradient filled objects. r=scootermorris
This commit is contained in:
Родитель
656d997521
Коммит
1414ad0936
|
@ -63,7 +63,7 @@ static cairo_matrix_t SVGToMatrix(nsIDOMSVGMatrix *ctm)
|
|||
|
||||
|
||||
static void
|
||||
CairoSetStops(cairo_pattern_t *aPattern, nsISVGGradient *aGrad)
|
||||
CairoSetStops(cairo_pattern_t *aPattern, nsISVGGradient *aGrad, float aOpacity)
|
||||
{
|
||||
PRUint32 nStops;
|
||||
float lastOffset = 0.0f;
|
||||
|
@ -87,7 +87,7 @@ CairoSetStops(cairo_pattern_t *aPattern, nsISVGGradient *aGrad)
|
|||
NS_GET_R(rgba)/255.0,
|
||||
NS_GET_G(rgba)/255.0,
|
||||
NS_GET_B(rgba)/255.0,
|
||||
opacity);
|
||||
opacity * aOpacity);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,10 @@ CairoGradient(cairo_t *ctx, nsISVGGradient *aGrad,
|
|||
|
||||
cairo_pattern_set_matrix(gradient, &patternMatrix);
|
||||
|
||||
CairoSetStops(gradient, aGrad);
|
||||
float opacity;
|
||||
aSource->GetFillOpacity(&opacity);
|
||||
|
||||
CairoSetStops(gradient, aGrad, opacity);
|
||||
|
||||
return gradient;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче