b=777946 implement SCALE_STRETCH through ComputeEffectiveTransforms r=Bas

This commit is contained in:
Karl Tomlinson
2012-09-18 15:16:15 +12:00
parent 22a3dc7e67
commit ebb45f3543
6 changed files with 15 additions and 18 deletions

View File

@@ -98,15 +98,6 @@ BasicImageLayer::GetAndPaintCurrentImage(gfxContext* aContext,
}
pat->SetFilter(mFilter);
gfxIntSize sourceSize = surface->GetSize();
if (mScaleMode != SCALE_NONE) {
NS_ASSERTION(mScaleMode == SCALE_STRETCH,
"No other scalemodes than stretch and none supported yet.");
gfxMatrix mat = pat->GetMatrix();
mat.Scale(float(sourceSize.width) / mScaleToSize.width, float(sourceSize.height) / mScaleToSize.height);
pat->SetMatrix(mat);
size = mScaleToSize;
}
// The visible region can extend outside the image, so just draw
// within the image bounds.