Flutter Engine
The Flutter Engine
SkottieValue.h
Go to the documentation of this file.
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
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
24
25class VectorValue : public std::vector<float> {
26public:
27 VectorValue() = default;
28
29 VectorValue(std::initializer_list<float> l) : INHERITED(l) {}
30
31 operator SkV3() const;
32private:
33 using INHERITED = std::vector<float>;
34};
35
36class ColorValue final : public VectorValue {
37public:
38 ColorValue() = default;
39
40 ColorValue(std::initializer_list<float> l) : INHERITED(l) {}
41
42 operator SkColor() const;
43 operator SkColor4f() const;
44
45private:
46 using INHERITED = VectorValue;
47};
48
49class ShapeValue final : public std::vector<float> {
50public:
51 operator SkPath() const;
52};
53
54} // namespace skottie
55
56#endif // SkottieValue_DEFINED
SkRGBA4f< kUnpremul_SkAlphaType > SkColor4f
Definition: SkColor.h:426
uint32_t SkColor
Definition: SkColor.h:37
Definition: SkPath.h:59
ColorValue(std::initializer_list< float > l)
Definition: SkottieValue.h:40
VectorValue(std::initializer_list< float > l)
Definition: SkottieValue.h:29
float SkScalar
Definition: extension.cpp:12
SkScalar ScalarValue
Definition: SkottieValue.h:22
Definition: SkM44.h:19
Definition: SkM44.h:56