aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar fs <fs@opera.com>2016-01-20 09:51:07 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-20 09:51:08 -0800
commitb1475b0d41efc580207183a4e25d14e920b57360 (patch)
treee6902299103f4f324c7cf1aafe95c8a1a9d30c81 /include/core
parent3425cbaee16aface56eafd3e97aa60071a3fec85 (diff)
Add SkPath::isLastContourClosed()
Adds a simple method for checking if the last command/verb in the current contour is a 'close'. This will simplify determining "closedness" for blink::Path, and aid in the implementation of algorithms such as: https://drafts.fxtf.org/motion-1/#motion-processing (second item in list) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1601103006 Review URL: https://codereview.chromium.org/1601103006
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkPath.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/core/SkPath.h b/include/core/SkPath.h
index 4ce816f92f..6952719815 100644
--- a/include/core/SkPath.h
+++ b/include/core/SkPath.h
@@ -187,6 +187,10 @@ public:
return 0 == fPathRef->countVerbs();
}
+ /** Return true if the last contour of this path ends with a close verb.
+ */
+ bool isLastContourClosed() const;
+
/**
* Returns true if all of the points in this path are finite, meaning there
* are no infinities and no NaNs.