| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SVGPathSegInterpolationFunctions_h | 5 #ifndef SVGPathSegInterpolationFunctions_h |
| 6 #define SVGPathSegInterpolationFunctions_h | 6 #define SVGPathSegInterpolationFunctions_h |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include "core/animation/InterpolableValue.h" | 9 #include "core/animation/InterpolableValue.h" |
| 9 #include "core/svg/SVGPathData.h" | 10 #include "core/svg/SVGPathData.h" |
| 10 #include <memory> | |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 struct PathCoordinates { | 14 struct PathCoordinates { |
| 15 double initial_x = 0; | 15 double initial_x = 0; |
| 16 double initial_y = 0; | 16 double initial_y = 0; |
| 17 double current_x = 0; | 17 double current_x = 0; |
| 18 double current_y = 0; | 18 double current_y = 0; |
| 19 }; | 19 }; |
| 20 | 20 |
| 21 class SVGPathSegInterpolationFunctions { | 21 class SVGPathSegInterpolationFunctions { |
| 22 STATIC_ONLY(SVGPathSegInterpolationFunctions); | 22 STATIC_ONLY(SVGPathSegInterpolationFunctions); |
| 23 | 23 |
| 24 public: | 24 public: |
| 25 static std::unique_ptr<InterpolableValue> ConsumePathSeg( | 25 static std::unique_ptr<InterpolableValue> ConsumePathSeg( |
| 26 const PathSegmentData&, | 26 const PathSegmentData&, |
| 27 PathCoordinates& current_coordinates); | 27 PathCoordinates& current_coordinates); |
| 28 static PathSegmentData ConsumeInterpolablePathSeg( | 28 static PathSegmentData ConsumeInterpolablePathSeg( |
| 29 const InterpolableValue&, | 29 const InterpolableValue&, |
| 30 SVGPathSegType, | 30 SVGPathSegType, |
| 31 PathCoordinates& current_coordinates); | 31 PathCoordinates& current_coordinates); |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 } // namespace blink | 34 } // namespace blink |
| 35 | 35 |
| 36 #endif // SVGPathSegInterpolationFunctions_h | 36 #endif // SVGPathSegInterpolationFunctions_h |
| OLD | NEW |