aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-11-03 15:33:14 +0000
committerGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-11-03 15:33:14 +0000
commit161b00bae2c759b157bb5f1141f497f706443902 (patch)
tree7a3a2b3b540a1007e5c7429dc2d9eea01828b416 /include
parent34245c7871f6339de8cc2be8fb1090ca3cba54ef (diff)
add SkEvalCubicInterval
git-svn-id: http://skia.googlecode.com/svn/trunk@416 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r--include/utils/SkCubicInterval.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/utils/SkCubicInterval.h b/include/utils/SkCubicInterval.h
new file mode 100644
index 0000000000..bd6fc5ff9d
--- /dev/null
+++ b/include/utils/SkCubicInterval.h
@@ -0,0 +1,16 @@
+#ifndef SkCubicInterval_DEFINED
+#define SkCubicInterval_DEFINED
+
+#include "SkPoint.h"
+
+SkScalar SkEvalCubicInterval(SkScalar x1, SkScalar y1,
+ SkScalar x2, SkScalar y2,
+ SkScalar unitX);
+
+static inline SkScalar SkEvalCubicInterval(const SkPoint pts[2], SkScalar x) {
+ return SkEvalCubicInterval(pts[0].fX, pts[0].fY,
+ pts[1].fX, pts[1].fY, x);
+}
+
+#endif
+