diff options
Diffstat (limited to 'cc/page_scale_animation.cc')
-rw-r--r-- | cc/page_scale_animation.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cc/page_scale_animation.cc b/cc/page_scale_animation.cc index 9c6b8e7..7a7ebfe 100644 --- a/cc/page_scale_animation.cc +++ b/cc/page_scale_animation.cc @@ -13,12 +13,12 @@ namespace cc { -scoped_ptr<PageScaleAnimation> PageScaleAnimation::create(const IntSize& scrollStart, float pageScaleStart, const IntSize& windowSize, const IntSize& contentSize, double startTime) +scoped_ptr<CCPageScaleAnimation> CCPageScaleAnimation::create(const IntSize& scrollStart, float pageScaleStart, const IntSize& windowSize, const IntSize& contentSize, double startTime) { - return make_scoped_ptr(new PageScaleAnimation(scrollStart, pageScaleStart, windowSize, contentSize, startTime)); + return make_scoped_ptr(new CCPageScaleAnimation(scrollStart, pageScaleStart, windowSize, contentSize, startTime)); } -PageScaleAnimation::PageScaleAnimation(const IntSize& scrollStart, float pageScaleStart, const IntSize& windowSize, const IntSize& contentSize, double startTime) +CCPageScaleAnimation::CCPageScaleAnimation(const IntSize& scrollStart, float pageScaleStart, const IntSize& windowSize, const IntSize& contentSize, double startTime) : m_scrollStart(scrollStart) , m_pageScaleStart(pageScaleStart) , m_windowSize(windowSize) @@ -31,7 +31,7 @@ PageScaleAnimation::PageScaleAnimation(const IntSize& scrollStart, float pageSca { } -void PageScaleAnimation::zoomTo(const IntSize& finalScroll, float finalPageScale, double duration) +void CCPageScaleAnimation::zoomTo(const IntSize& finalScroll, float finalPageScale, double duration) { if (m_pageScaleStart != finalPageScale) { // For uniform-looking zooming, infer the anchor (point that remains in @@ -66,7 +66,7 @@ void PageScaleAnimation::zoomTo(const IntSize& finalScroll, float finalPageScale } } -void PageScaleAnimation::zoomWithAnchor(const IntSize& anchor, float finalPageScale, double duration) +void CCPageScaleAnimation::zoomWithAnchor(const IntSize& anchor, float finalPageScale, double duration) { m_scrollEnd = m_scrollStart + anchor; m_scrollEnd.scale(finalPageScale / m_pageScaleStart); @@ -84,22 +84,22 @@ void PageScaleAnimation::zoomWithAnchor(const IntSize& anchor, float finalPageSc m_anchorMode = true; } -IntSize PageScaleAnimation::scrollOffsetAtTime(double time) const +IntSize CCPageScaleAnimation::scrollOffsetAtTime(double time) const { return scrollOffsetAtRatio(progressRatioForTime(time)); } -float PageScaleAnimation::pageScaleAtTime(double time) const +float CCPageScaleAnimation::pageScaleAtTime(double time) const { return pageScaleAtRatio(progressRatioForTime(time)); } -bool PageScaleAnimation::isAnimationCompleteAtTime(double time) const +bool CCPageScaleAnimation::isAnimationCompleteAtTime(double time) const { return time >= endTime(); } -float PageScaleAnimation::progressRatioForTime(double time) const +float CCPageScaleAnimation::progressRatioForTime(double time) const { if (isAnimationCompleteAtTime(time)) return 1; @@ -107,7 +107,7 @@ float PageScaleAnimation::progressRatioForTime(double time) const return (time - m_startTime) / m_duration; } -IntSize PageScaleAnimation::scrollOffsetAtRatio(float ratio) const +IntSize CCPageScaleAnimation::scrollOffsetAtRatio(float ratio) const { if (ratio <= 0) return m_scrollStart; @@ -137,7 +137,7 @@ IntSize PageScaleAnimation::scrollOffsetAtRatio(float ratio) const return currentScrollOffset; } -float PageScaleAnimation::pageScaleAtRatio(float ratio) const +float CCPageScaleAnimation::pageScaleAtRatio(float ratio) const { if (ratio <= 0) return m_pageScaleStart; |