Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: gm/pathfill.cpp

Issue 1548643002: revised strokerect gm (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: handle halfway case in scan converter Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/composeshader.cpp ('k') | gm/strokerect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/pathfill.cpp
diff --git a/gm/pathfill.cpp b/gm/pathfill.cpp
index a524588241a481e85c386319da38673c1db5742e..c51a8fcf35088d2d29e18deea8ef61a01f422f0b 100644
--- a/gm/pathfill.cpp
+++ b/gm/pathfill.cpp
@@ -213,6 +213,42 @@ private:
typedef skiagm::GM INHERITED;
};
+DEF_SIMPLE_GM(halfpathfill, canvas, 100, 100) {
+ SkPaint paint;
+ SkPath path;
+ path.moveTo(16365.5f, 1394);
+ path.lineTo(16365.5f, 1387.5f);
+ path.quadTo(16365.5f, 1385.43f, 16367, 1383.96f);
+ path.quadTo(16368.4f, 1382.5f, 16370.5f, 1382.5f);
+ path.lineTo(16465.5f, 1382.5f);
+ path.quadTo(16467.6f, 1382.5f, 16469, 1383.96f);
+ path.quadTo(16470.5f, 1385.43f, 16470.5f, 1387.5f);
+ path.lineTo(16470.5f, 1394);
+ path.quadTo(16470.5f, 1396.07f, 16469, 1397.54f);
+ path.quadTo(16467.6f, 1399, 16465.5f, 1399);
+ path.lineTo(16370.5f, 1399);
+ path.quadTo(16368.4f, 1399, 16367, 1397.54f);
+ path.quadTo(16365.5f, 1396.07f, 16365.5f, 1394);
+ path.close();
+ SkPath p2;
+ SkMatrix m;
+ m.reset();
+ m.postTranslate(0.001f, 0.001f);
+ path.transform(m, &p2);
+
+ canvas->translate(-16366, -1383);
+ canvas->drawPath(p2, paint);
+
+ m.reset();
+ m.postTranslate(-0.001f, -0.001f);
+ path.transform(m, &p2);
+ canvas->drawPath(p2, paint);
+
+ m.reset();
+ path.transform(m, &p2);
+ canvas->drawPath(p2, paint);
+}
+
///////////////////////////////////////////////////////////////////////////////
DEF_GM( return new PathFillGM; )
« no previous file with comments | « gm/composeshader.cpp ('k') | gm/strokerect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698