Flutter Engine
The Flutter Engine
Public Types | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
SkGradientShader::Interpolation Struct Reference

#include <SkGradientShader.h>

Public Types

enum class  InPremul : bool { kNo = false , kYes = true }
 
enum class  ColorSpace : uint8_t {
  kDestination , kSRGBLinear , kLab , kOKLab ,
  kOKLabGamutMap , kLCH , kOKLCH , kOKLCHGamutMap ,
  kSRGB , kHSL , kHWB , kLastColorSpace = kHWB
}
 
enum class  HueMethod : uint8_t {
  kShorter , kLonger , kIncreasing , kDecreasing ,
  kLastHueMethod = kDecreasing
}
 

Static Public Member Functions

static Interpolation FromFlags (uint32_t flags)
 

Public Attributes

InPremul fInPremul = InPremul::kNo
 
ColorSpace fColorSpace = ColorSpace::kDestination
 
HueMethod fHueMethod = HueMethod::kShorter
 

Static Public Attributes

static constexpr int kColorSpaceCount = static_cast<int>(ColorSpace::kLastColorSpace) + 1
 
static constexpr int kHueMethodCount = static_cast<int>(HueMethod::kLastHueMethod) + 1
 

Detailed Description

Definition at line 71 of file SkGradientShader.h.

Member Enumeration Documentation

◆ ColorSpace

enum class SkGradientShader::Interpolation::ColorSpace : uint8_t
strong
Enumerator
kDestination 
kSRGBLinear 
kLab 
kOKLab 
kOKLabGamutMap 
kLCH 
kOKLCH 
kOKLCHGamutMap 
kSRGB 
kHSL 
kHWB 
kLastColorSpace 

Definition at line 74 of file SkGradientShader.h.

74 : uint8_t {
75 // Default Skia behavior: interpolate in the color space of the destination surface
77
78 // https://www.w3.org/TR/css-color-4/#interpolation-space
79 kSRGBLinear,
80 kLab,
81 kOKLab,
82 // This is the same as kOKLab, except it has a simplified version of the CSS gamut
83 // mapping algorithm (https://www.w3.org/TR/css-color-4/#css-gamut-mapping)
84 // into Rec2020 space applied to it.
85 // Warning: This space is experimental and should not be used in production.
86 kOKLabGamutMap,
87 kLCH,
88 kOKLCH,
89 // This is the same as kOKLCH, except it has the same gamut mapping applied to it
90 // as kOKLabGamutMap does.
91 // Warning: This space is experimental and should not be used in production.
92 kOKLCHGamutMap,
93 kSRGB,
94 kHSL,
95 kHWB,
96
97 kLastColorSpace = kHWB,
98 };
@ kSRGB
Definition: image.h:17

◆ HueMethod

enum class SkGradientShader::Interpolation::HueMethod : uint8_t
strong
Enumerator
kShorter 
kLonger 
kIncreasing 
kDecreasing 
kLastHueMethod 

Definition at line 101 of file SkGradientShader.h.

101 : uint8_t {
102 // https://www.w3.org/TR/css-color-4/#hue-interpolation
103 kShorter,
104 kLonger,
105 kIncreasing,
106 kDecreasing,
107
108 kLastHueMethod = kDecreasing,
109 };

◆ InPremul

Enumerator
kNo 
kYes 

Definition at line 72 of file SkGradientShader.h.

72: bool { kNo = false, kYes = true };
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.

Member Function Documentation

◆ FromFlags()

static Interpolation SkGradientShader::Interpolation::FromFlags ( uint32_t  flags)
inlinestatic

Member Data Documentation

◆ fColorSpace

ColorSpace SkGradientShader::Interpolation::fColorSpace = ColorSpace::kDestination

Definition at line 113 of file SkGradientShader.h.

◆ fHueMethod

HueMethod SkGradientShader::Interpolation::fHueMethod = HueMethod::kShorter

Definition at line 114 of file SkGradientShader.h.

◆ fInPremul

InPremul SkGradientShader::Interpolation::fInPremul = InPremul::kNo

Definition at line 112 of file SkGradientShader.h.

◆ kColorSpaceCount

constexpr int SkGradientShader::Interpolation::kColorSpaceCount = static_cast<int>(ColorSpace::kLastColorSpace) + 1
staticconstexpr

Definition at line 99 of file SkGradientShader.h.

◆ kHueMethodCount

constexpr int SkGradientShader::Interpolation::kHueMethodCount = static_cast<int>(HueMethod::kLastHueMethod) + 1
staticconstexpr

Definition at line 110 of file SkGradientShader.h.


The documentation for this struct was generated from the following file: