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

Unified Diff: src/utils/SkCurveMeasure.cpp

Issue 2229893002: Add time return argument to SkCurveMeasure's getPosTan, rename to getPosTanTime (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 | « src/utils/SkCurveMeasure.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkCurveMeasure.cpp
diff --git a/src/utils/SkCurveMeasure.cpp b/src/utils/SkCurveMeasure.cpp
index 785bca7cfd15f5c118348249be2f1e0f879c3ea6..fc2aa84faa119558d5dce1c30f6bdd826c3eb890 100644
--- a/src/utils/SkCurveMeasure.cpp
+++ b/src/utils/SkCurveMeasure.cpp
@@ -234,10 +234,13 @@ SkScalar SkCurveMeasure::getTime(SkScalar targetLength) {
return currentT;
}
-void SkCurveMeasure::getPosTan(SkScalar targetLength, SkPoint* pos,
- SkVector* tan) {
+void SkCurveMeasure::getPosTanTime(SkScalar targetLength, SkPoint* pos,
+ SkVector* tan, SkScalar* time) {
SkScalar t = getTime(targetLength);
+ if (time) {
+ *time = t;
+ }
if (pos) {
// TODO(hstern) switch here on curve type.
*pos = evaluateQuad(t);
« no previous file with comments | « src/utils/SkCurveMeasure.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698