From 647d3daeea5add5e80c4b84a07c1c8c46526a387 Mon Sep 17 00:00:00 2001 From: "reed@android.com" Date: Mon, 17 May 2010 14:15:14 +0000 Subject: [PATCH] fix maxWidth when using linear-text git-svn-id: http://skia.googlecode.com/svn/trunk@565 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkPaint.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp index 3d85b8c839..da818c48c2 100644 --- a/src/core/SkPaint.cpp +++ b/src/core/SkPaint.cpp @@ -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)); } -- 2.34.1