Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
skottie::ColorValue Class Referencefinal

#include <SkottieValue.h>

Inheritance diagram for skottie::ColorValue:
skottie::VectorValue

Public Member Functions

 ColorValue ()=default
 
 ColorValue (std::initializer_list< float > l)
 
 operator SkColor () const
 
 operator SkColor4f () const
 
- Public Member Functions inherited from skottie::VectorValue
 VectorValue ()=default
 
 VectorValue (std::initializer_list< float > l)
 
 operator SkV3 () const
 

Detailed Description

Definition at line 36 of file SkottieValue.h.

Constructor & Destructor Documentation

◆ ColorValue() [1/2]

skottie::ColorValue::ColorValue ( )
default

◆ ColorValue() [2/2]

skottie::ColorValue::ColorValue ( std::initializer_list< float >  l)
inline

Definition at line 40 of file SkottieValue.h.

40: INHERITED(l) {}

Member Function Documentation

◆ operator SkColor()

skottie::ColorValue::operator SkColor ( ) const

Definition at line 60 of file VectorKeyframeAnimator.cpp.

60 {
61 return static_cast<SkColor4f>(*this).toSkColor();
62}

◆ operator SkColor4f()

skottie::ColorValue::operator SkColor4f ( ) const

Definition at line 64 of file VectorKeyframeAnimator.cpp.

64 {
65 // best effort to turn a vector into a color
66 const auto r = this->size() > 0 ? SkTPin((*this)[0], 0.0f, 1.0f) : 0,
67 g = this->size() > 1 ? SkTPin((*this)[1], 0.0f, 1.0f) : 0,
68 b = this->size() > 2 ? SkTPin((*this)[2], 0.0f, 1.0f) : 0,
69 a = this->size() > 3 ? SkTPin((*this)[3], 0.0f, 1.0f) : 1;
70
71 return { r, g, b, a };
72}
static constexpr const T & SkTPin(const T &x, const T &lo, const T &hi)
Definition: SkTPin.h:19
static bool b
struct MyStruct a[10]
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259

The documentation for this class was generated from the following files: