handle scale < 0 for stroke-rects

git-svn-id: http://skia.googlecode.com/svn/trunk@1052 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-04-05 13:05:18 +00:00
parent 0ebe81a2b7
commit 6115338c59

View File

@ -689,6 +689,8 @@ static bool easy_rect_join(const SkPaint& paint, const SkMatrix& matrix,
SkASSERT(matrix.rectStaysRect());
SkPoint pt = { paint.getStrokeWidth(), paint.getStrokeWidth() };
matrix.mapVectors(strokeSize, &pt, 1);
strokeSize->fX = SkScalarAbs(strokeSize->fX);
strokeSize->fY = SkScalarAbs(strokeSize->fY);
return true;
}