aboutsummaryrefslogtreecommitdiffhomepage
path: root/libs/graphics/animator/SkDrawDash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/graphics/animator/SkDrawDash.cpp')
-rw-r--r--libs/graphics/animator/SkDrawDash.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/libs/graphics/animator/SkDrawDash.cpp b/libs/graphics/animator/SkDrawDash.cpp
new file mode 100644
index 0000000000..78e2d66db8
--- /dev/null
+++ b/libs/graphics/animator/SkDrawDash.cpp
@@ -0,0 +1,27 @@
+#include "SkDrawDash.h"
+#include "SkDashPathEffect.h"
+
+#if SK_USE_CONDENSED_INFO == 0
+
+const SkMemberInfo SkDash::fInfo[] = {
+ SK_MEMBER_ARRAY(intervals, Float),
+ SK_MEMBER(phase, Float)
+};
+
+#endif
+
+DEFINE_GET_MEMBER(SkDash);
+
+SkDash::SkDash() : phase(0) {
+}
+
+SkDash::~SkDash() {
+}
+
+SkPathEffect* SkDash::getPathEffect() {
+ int count = intervals.count();
+ if (count == 0)
+ return nil;
+ return new SkDashPathEffect(intervals.begin(), count, phase);
+}
+