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 "include/core/SkColor.h"
12#include "include/core/SkM44.h"
13#include "include/core/SkPath.h"
14
15#include <initializer_list>
16#include <vector>
17
18namespace skjson { class Value; }
19
20namespace skottie {
21
22using ScalarValue = SkScalar;
23using Vec2Value = SkV2;
24
25class VectorValue final : public std::vector<float> {
26public:
27 VectorValue() = default;
28
29 VectorValue(std::initializer_list<float> l) : INHERITED(l) {}
30
31 operator SkV3() const;
32 operator SkColor() const;
33 operator SkColor4f() const;
34
35private:
36 using INHERITED = std::vector<float>;
37};
38
39class ShapeValue final : public std::vector<float> {
40public:
41 operator SkPath() const;
42};
43
44} // namespace skottie
45
46#endif // SkottieValue_DEFINED
47