aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-03-25 14:31:46 +0000
committerGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-03-25 14:31:46 +0000
commitb641c9f20beb36dbf4e8df53a199c84cef3be9b2 (patch)
tree9e73308ce87a6c75023f50a13027c9f037894f05
parent8381e007dc655b7db4ddf5cafdc057f2dbc1dc6a (diff)
if we're strokeandfill+hairline, just draw fill (they way paths do) instead
of just hairline stroking (bad) git-svn-id: http://skia.googlecode.com/svn/trunk@533 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/core/SkDraw.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index f112d4b088..45b4c356f4 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -706,7 +706,10 @@ void SkDraw::drawRect(const SkRect& rect, const SkPaint& paint) const {
SkBlitter* blitter = blitterStorage.get();
const SkRegion* clip = fClip;
- if (paint.getStyle() == SkPaint::kFill_Style) {
+ // we want to "fill" if we are kFill or kStrokeAndFill, since in the latter
+ // case we are also hairline (if we've gotten to here), which devolves to
+ // effectively just kFill
+ if (paint.getStyle() != SkPaint::kStroke_Style) {
if (paint.isAntiAlias()) {
SkScan::AntiFillRect(devRect, clip, blitter);
} else {