Florin Malita | a6e30f7 | 2018-03-23 13:41:58 -0400 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2017 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef SkottieValue_DEFINED |
| 9 | #define SkottieValue_DEFINED |
| 10 | |
| 11 | #include "SkPath.h" |
| 12 | #include "SkScalar.h" |
| 13 | |
| 14 | #include <vector> |
| 15 | |
| 16 | namespace skottie { |
| 17 | |
| 18 | template <typename T> |
| 19 | struct ValueTraits { |
| 20 | static size_t Cardinality(const T&); |
| 21 | |
| 22 | template <typename U> |
| 23 | static U As(const T&); |
| 24 | }; |
| 25 | |
| 26 | using ScalarValue = SkScalar; |
| 27 | using VectorValue = std::vector<ScalarValue>; |
| 28 | using ShapeValue = SkPath; |
| 29 | |
| 30 | } // namespace skottie |
| 31 | |
| 32 | #endif // SkottieValue_DEFINED |