Loading core/jni/android/graphics/NinePatch.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -102,8 +102,8 @@ public: canvas->translate(bounds.fLeft, bounds.fTop); canvas->scale(scale, scale); bounds.fRight = SkScalarDiv(bounds.fRight-bounds.fLeft, scale); bounds.fBottom = SkScalarDiv(bounds.fBottom-bounds.fTop, scale); bounds.fRight = (bounds.fRight-bounds.fLeft) / scale; bounds.fBottom = (bounds.fBottom-bounds.fTop) / scale; bounds.fLeft = bounds.fTop = 0; ALOGV("Drawing scaled 9-patch: (%g,%g)-(%g,%g) srcDensity=%d destDensity=%d", Loading core/jni/android/graphics/NinePatchImpl.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -94,8 +94,7 @@ SkScalar calculateStretch(SkScalar boundsLimit, SkScalar startingPoint, SkScalar spaceRemaining = boundsLimit - startingPoint; SkScalar stretchySpaceRemaining = spaceRemaining - SkIntToScalar(numFixedPixelsRemaining); return SkScalarMulDiv(srcSpace, stretchySpaceRemaining, numStrechyPixelsRemaining); return srcSpace * stretchySpaceRemaining / numStrechyPixelsRemaining; } void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds, Loading Loading
core/jni/android/graphics/NinePatch.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -102,8 +102,8 @@ public: canvas->translate(bounds.fLeft, bounds.fTop); canvas->scale(scale, scale); bounds.fRight = SkScalarDiv(bounds.fRight-bounds.fLeft, scale); bounds.fBottom = SkScalarDiv(bounds.fBottom-bounds.fTop, scale); bounds.fRight = (bounds.fRight-bounds.fLeft) / scale; bounds.fBottom = (bounds.fBottom-bounds.fTop) / scale; bounds.fLeft = bounds.fTop = 0; ALOGV("Drawing scaled 9-patch: (%g,%g)-(%g,%g) srcDensity=%d destDensity=%d", Loading
core/jni/android/graphics/NinePatchImpl.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -94,8 +94,7 @@ SkScalar calculateStretch(SkScalar boundsLimit, SkScalar startingPoint, SkScalar spaceRemaining = boundsLimit - startingPoint; SkScalar stretchySpaceRemaining = spaceRemaining - SkIntToScalar(numFixedPixelsRemaining); return SkScalarMulDiv(srcSpace, stretchySpaceRemaining, numStrechyPixelsRemaining); return srcSpace * stretchySpaceRemaining / numStrechyPixelsRemaining; } void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds, Loading