aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPath.h
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-10 14:05:43 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-10 14:05:43 +0000
commit7e6c4d16010550ee148f1c79cf088c0320fed5c1 (patch)
treea0a6c6d85998718a1e825d75ee71d8a13ab20983 /include/core/SkPath.h
parent963a8fa542134f3ddbd40165e1b3f9edf9f074dd (diff)
add SkPath::isLine(), similar to isRect()
git-svn-id: http://skia.googlecode.com/svn/trunk@3892 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkPath.h')
-rw-r--r--include/core/SkPath.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/core/SkPath.h b/include/core/SkPath.h
index 025e7099b5..27a2fa275f 100644
--- a/include/core/SkPath.h
+++ b/include/core/SkPath.h
@@ -221,6 +221,14 @@ public:
p3.equalsWithinTolerance(p4);
}
+ /**
+ * Returns true if the path specifies a single line (i.e. it contains just
+ * a moveTo and a lineTo). If so, and line[] is not null, it sets the 2
+ * points in line[] to the end-points of the line. If the path is not a
+ * line, returns false and ignores line[].
+ */
+ bool isLine(SkPoint line[2]) const;
+
/** Returns true if the path specifies a rectangle. If so, and if rect is
not null, set rect to the bounds of the path. If the path does not
specify a rectangle, return false and ignore rect.