Index: samplecode/SampleArc.cpp |
diff --git a/samplecode/SampleArc.cpp b/samplecode/SampleArc.cpp |
index df452ce77687e6ee752d4c29eee9e90a640a2f74..9f922ae2d618ede08a749a10f3662c91fe0059d4 100644 |
--- a/samplecode/SampleArc.cpp |
+++ b/samplecode/SampleArc.cpp |
@@ -195,9 +195,13 @@ protected: |
} |
void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { |
- fAnimatingDrawable->setSweep(SampleCode::GetAnimScalar(360/24, 360)); |
canvas->EXPERIMENTAL_drawDrawable(fRootDrawable); |
- this->inval(NULL); |
+ } |
+ |
+ bool onAnimatePulse(SkMSec curr, SkMSec prev) SK_OVERRIDE { |
+ SkScalar angle = SkDoubleToScalar(fmod(curr * 0.36 / 24, 360)); |
+ fAnimatingDrawable->setSweep(angle); |
+ return true; |
} |
SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) SK_OVERRIDE { |