if we're strokeandfill+hairline, just draw fill (they way paths do) instead
authorreed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 25 Mar 2010 14:31:46 +0000 (14:31 +0000)
committerreed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 25 Mar 2010 14:31:46 +0000 (14:31 +0000)
of just hairline stroking (bad)

git-svn-id: http://skia.googlecode.com/svn/trunk@533 2bbb7eff-a529-9590-31e7-b0007b416f81

src/core/SkDraw.cpp

index f112d4b..45b4c35 100644 (file)
@@ -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 {