fix maxWidth when using linear-text

git-svn-id: http://skia.googlecode.com/svn/trunk@565 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@android.com 2010-05-17 14:15:14 +00:00
parent cf4ac25442
commit 647d3daeea

View File

@ -906,6 +906,7 @@ size_t SkPaint::breakText(const void* textD, size_t length, SkScalar maxWidth,
if (this->isLinearText())
{
scale = fTextSize / kCanonicalTextSizeForPaths;
maxWidth = SkScalarMulDiv(maxWidth, kCanonicalTextSizeForPaths, fTextSize);
// this gets restored by restore
((SkPaint*)this)->setTextSize(SkIntToScalar(kCanonicalTextSizeForPaths));
}