Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
SkColorConverter Struct Reference

#include <SkGradientBaseShader.h>

Public Member Functions

 SkColorConverter (const SkColor *colors, int count)
 

Public Attributes

skia_private::STArray< 2, SkColor4ffColors4f
 

Detailed Description

Definition at line 187 of file SkGradientBaseShader.h.

Constructor & Destructor Documentation

◆ SkColorConverter()

SkColorConverter::SkColorConverter ( const SkColor colors,
int  count 
)

Definition at line 962 of file SkGradientBaseShader.cpp.

962 {
963 const float ONE_OVER_255 = 1.f / 255;
964 for (int i = 0; i < count; ++i) {
965 fColors4f.push_back({SkColorGetR(colors[i]) * ONE_OVER_255,
966 SkColorGetG(colors[i]) * ONE_OVER_255,
967 SkColorGetB(colors[i]) * ONE_OVER_255,
968 SkColorGetA(colors[i]) * ONE_OVER_255});
969 }
970}
int count
Definition: FontMgrTest.cpp:50
#define SkColorGetR(color)
Definition: SkColor.h:65
#define SkColorGetG(color)
Definition: SkColor.h:69
#define SkColorGetA(color)
Definition: SkColor.h:61
#define SkColorGetB(color)
Definition: SkColor.h:73
PODArray< SkColor > colors
Definition: SkRecords.h:276
skia_private::STArray< 2, SkColor4f > fColors4f

Member Data Documentation

◆ fColors4f

skia_private::STArray<2, SkColor4f> SkColorConverter::fColors4f

Definition at line 190 of file SkGradientBaseShader.h.


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