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:
parent
cf4ac25442
commit
647d3daeea
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user