OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef AnimatablePath_h |
| 6 #define AnimatablePath_h |
| 7 |
| 8 #include "core/CoreExport.h" |
| 9 #include "core/animation/animatable/AnimatableValue.h" |
| 10 #include "core/svg/SVGPathByteStream.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class CORE_EXPORT AnimatablePath final : public AnimatableValue { |
| 15 public: |
| 16 ~AnimatablePath() override { } |
| 17 static PassRefPtr<AnimatablePath> create(PassOwnPtr<SVGPathByteStream> byteS
tream) |
| 18 { |
| 19 return adoptRef(new AnimatablePath(byteStream)); |
| 20 } |
| 21 |
| 22 const SVGPathByteStream* pathByteStream() const { return m_byteStream.get();
} |
| 23 |
| 24 protected: |
| 25 PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fra
ction) const override; |
| 26 bool usesDefaultInterpolationWith(const AnimatableValue*) const override; |
| 27 |
| 28 private: |
| 29 explicit AnimatablePath(PassOwnPtr<SVGPathByteStream> byteStream) |
| 30 : m_byteStream(byteStream) |
| 31 { |
| 32 } |
| 33 AnimatableType type() const override { return TypePath; } |
| 34 bool equalTo(const AnimatableValue*) const override; |
| 35 OwnPtr<SVGPathByteStream> m_byteStream; |
| 36 }; |
| 37 |
| 38 DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatablePath, isPath()); |
| 39 |
| 40 } // namespace blink |
| 41 |
| 42 #endif // AnimatablePath_h |
OLD | NEW |