Flutter Engine
The Flutter Engine
Namespaces | Macros | Functions | Variables
color.cc File Reference
#include "impeller/geometry/color.h"
#include <algorithm>
#include <cmath>
#include <functional>
#include <sstream>
#include <type_traits>
#include "impeller/base/strings.h"
#include "impeller/geometry/constants.h"
#include "impeller/geometry/scalar.h"
#include "impeller/geometry/vector.h"

Go to the source code of this file.

Namespaces

namespace  impeller
 

Macros

#define _IMPELLER_ASSERT_BLEND_MODE(blend_mode)
 
#define _IMPELLER_BLEND_MODE_NAME_LIST(blend_mode)   #blend_mode,
 

Functions

static constexpr bool impeller::ValidateBlendModes ()
 
const char * impeller::BlendModeToString (BlendMode blend_mode)
 
static constexpr Color impeller::Min (Color c, float threshold)
 
static constexpr Scalar impeller::Luminosity (Vector3 color)
 
static constexpr Vector3 impeller::ClipColor (Vector3 color)
 
static constexpr Vector3 impeller::SetLuminosity (Vector3 color, Scalar luminosity)
 
static constexpr Scalar impeller::Saturation (Vector3 color)
 
static constexpr Vector3 impeller::SetSaturation (Vector3 color, Scalar saturation)
 
static constexpr Vector3 impeller::ComponentChoose (Vector3 a, Vector3 b, Vector3 value, Scalar cutoff)
 
static constexpr Vector3 impeller::ToRGB (Color color)
 
static constexpr Color impeller::FromRGB (Vector3 color, Scalar alpha)
 
static constexpr Color impeller::ApplyBlendedColor (Color dst, Color src, Vector3 blend_result)
 
static constexpr Color impeller::DoColorBlend (Color dst, Color src, const std::function< Vector3(Vector3, Vector3)> &blend_rgb_func)
 
static constexpr Color impeller::DoColorBlendComponents (Color dst, Color src, const std::function< Scalar(Scalar, Scalar)> &blend_func)
 
std::string impeller::ColorToString (const Color &color)
 

Variables

static constexpr const char * impeller::kBlendModeNames []
 

Macro Definition Documentation

◆ _IMPELLER_ASSERT_BLEND_MODE

#define _IMPELLER_ASSERT_BLEND_MODE (   blend_mode)
Value:
auto enum_##blend_mode = static_cast<std::underlying_type_t<BlendMode>>( \
BlendMode::k##blend_mode); \
if (i != enum_##blend_mode) { \
return false; \
} \
++i;

Definition at line 20 of file color.cc.

◆ _IMPELLER_BLEND_MODE_NAME_LIST

#define _IMPELLER_BLEND_MODE_NAME_LIST (   blend_mode)    #blend_mode,

Definition at line 42 of file color.cc.