aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkGeometry.h
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-07 20:42:35 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-07 20:42:35 +0000
commit24bd210f2e2cf66f356b4e98f7801631089b8aa3 (patch)
tree02f855afeeda51f106f719579618b396b134a0e6 /include/core/SkGeometry.h
parent96fd3440fa489f74f903f30487282af99deb2a4d (diff)
add (untested) tangent calc for conics
git-svn-id: http://skia.googlecode.com/svn/trunk@9048 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkGeometry.h')
-rw-r--r--include/core/SkGeometry.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/core/SkGeometry.h b/include/core/SkGeometry.h
index 1251fcf98d..6218ed1843 100644
--- a/include/core/SkGeometry.h
+++ b/include/core/SkGeometry.h
@@ -216,7 +216,14 @@ struct SkConic {
fW = w;
}
- void evalAt(SkScalar t, SkPoint* pt) const;
+ /**
+ * Given a t-value [0...1] return its position and/or tangent.
+ * If pos is not null, return its position at the t-value.
+ * If tangent is not null, return its tangent at the t-value. NOTE the
+ * tangent value's length is arbitrary, and only its direction should
+ * be used.
+ */
+ void evalAt(SkScalar t, SkPoint* pos, SkVector* tangent = NULL) const;
void chopAt(SkScalar t, SkConic dst[2]) const;
void chop(SkConic dst[2]) const;