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

Unified Diff: src/core/SkStrokerPriv.cpp

Issue 2691843003: Make round-caps line segments convex
Patch Set: Created 3 years, 10 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkStrokerPriv.cpp
diff --git a/src/core/SkStrokerPriv.cpp b/src/core/SkStrokerPriv.cpp
index 52144cdc5fc18bca2469d8d904697f1448d54bd7..b7eba67411fb83345623d1f5a3c2b83a2d23017b 100644
--- a/src/core/SkStrokerPriv.cpp
+++ b/src/core/SkStrokerPriv.cpp
@@ -21,8 +21,8 @@ static void RoundCapper(SkPath* path, const SkPoint& pivot, const SkVector& norm
SkPoint projectedCenter = pivot + parallel;
- path->conicTo(projectedCenter + normal, projectedCenter, SK_ScalarRoot2Over2);
- path->conicTo(projectedCenter - normal, stop, SK_ScalarRoot2Over2);
+ path->conicTo(pivot + (parallel + normal) * 0.999, projectedCenter, SK_ScalarRoot2Over2);
+ path->conicTo(pivot + (parallel - normal) * 0.999, stop, SK_ScalarRoot2Over2);
}
static void SquareCapper(SkPath* path, const SkPoint& pivot, const SkVector& normal,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698