Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ColorPos Struct Reference

Public Member Functions

 ColorPos ()
 
 ~ColorPos ()
 
void construct (const SkColor colors[], const SkScalar pos[], int count)
 

Public Attributes

SkColorfColors
 
SkScalarfPos
 
int fCount
 

Detailed Description

Definition at line 142 of file gradients_no_texture.cpp.

Constructor & Destructor Documentation

◆ ColorPos()

ColorPos::ColorPos ( )
inline

Definition at line 147 of file gradients_no_texture.cpp.

147: fColors(nullptr), fPos(nullptr), fCount(0) {}

◆ ~ColorPos()

ColorPos::~ColorPos ( )
inline

Definition at line 148 of file gradients_no_texture.cpp.

148 {
149 delete[] fColors;
150 delete[] fPos;
151 }

Member Function Documentation

◆ construct()

void ColorPos::construct ( const SkColor  colors[],
const SkScalar  pos[],
int  count 
)
inline

Definition at line 153 of file gradients_no_texture.cpp.

153 {
154 fColors = new SkColor[count];
155 memcpy(fColors, colors, count * sizeof(SkColor));
156 if (pos) {
157 fPos = new SkScalar[count];
158 memcpy(fPos, pos, count * sizeof(SkScalar));
159 fPos[0] = 0;
160 fPos[count - 1] = 1;
161 }
162 fCount = count;
163 }
int count
SkPoint pos
uint32_t SkColor
Definition SkColor.h:37
float SkScalar
Definition extension.cpp:12

Member Data Documentation

◆ fColors

SkColor* ColorPos::fColors

Definition at line 143 of file gradients_no_texture.cpp.

◆ fCount

int ColorPos::fCount

Definition at line 145 of file gradients_no_texture.cpp.

◆ fPos

SkScalar* ColorPos::fPos

Definition at line 144 of file gradients_no_texture.cpp.


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