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 "core/animation/InterpolableValue.h" | 8 #include "core/animation/InterpolableValue.h" |
9 #include "core/svg/SVGPathData.h" | 9 #include "core/svg/SVGPathData.h" |
| 10 #include <memory> |
10 | 11 |
11 namespace blink { | 12 namespace blink { |
12 | 13 |
13 struct PathCoordinates { | 14 struct PathCoordinates { |
14 double initialX = 0; | 15 double initialX = 0; |
15 double initialY = 0; | 16 double initialY = 0; |
16 double currentX = 0; | 17 double currentX = 0; |
17 double currentY = 0; | 18 double currentY = 0; |
18 }; | 19 }; |
19 | 20 |
20 class SVGPathSegInterpolationFunctions { | 21 class SVGPathSegInterpolationFunctions { |
21 STATIC_ONLY(SVGPathSegInterpolationFunctions); | 22 STATIC_ONLY(SVGPathSegInterpolationFunctions); |
22 public: | 23 public: |
23 static PassOwnPtr<InterpolableValue> consumePathSeg(const PathSegmentData&,
PathCoordinates& currentCoordinates); | 24 static std::unique_ptr<InterpolableValue> consumePathSeg(const PathSegmentDa
ta&, PathCoordinates& currentCoordinates); |
24 static PathSegmentData consumeInterpolablePathSeg(const InterpolableValue&,
SVGPathSegType, PathCoordinates& currentCoordinates); | 25 static PathSegmentData consumeInterpolablePathSeg(const InterpolableValue&,
SVGPathSegType, PathCoordinates& currentCoordinates); |
25 }; | 26 }; |
26 | 27 |
27 } // namespace blink | 28 } // namespace blink |
28 | 29 |
29 #endif // SVGPathSegInterpolationFunctions_h | 30 #endif // SVGPathSegInterpolationFunctions_h |
30 | 31 |
OLD | NEW |