зеркало из https://github.com/mozilla/gecko-dev.git
Bug 535185 - patterns of non-integer scaled size have seams. r=roc
This commit is contained in:
Родитель
39819bf5e6
Коммит
a5223c1c5f
|
@ -241,8 +241,10 @@ nsSVGPatternFrame::PaintPattern(gfxASurface** surface,
|
|||
if (surfaceSize.width <= 0 || surfaceSize.height <= 0)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (resultOverflows) {
|
||||
// scale down drawing to new pattern surface size
|
||||
if (resultOverflows ||
|
||||
patternWidth != surfaceSize.width ||
|
||||
patternHeight != surfaceSize.height) {
|
||||
// scale drawing to pattern surface size
|
||||
nsCOMPtr<nsIDOMSVGMatrix> tempTM, aCTM;
|
||||
NS_NewSVGMatrix(getter_AddRefs(tempTM),
|
||||
surfaceSize.width / patternWidth, 0.0f,
|
||||
|
@ -251,7 +253,7 @@ nsSVGPatternFrame::PaintPattern(gfxASurface** surface,
|
|||
patternFrame->mCTM->Multiply(tempTM, getter_AddRefs(aCTM));
|
||||
aCTM.swap(patternFrame->mCTM);
|
||||
|
||||
// and magnify pattern to compensate
|
||||
// and rescale pattern to compensate
|
||||
patternMatrix->Scale(patternWidth / surfaceSize.width,
|
||||
patternHeight / surfaceSize.height);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче