Flutter Engine
The Flutter Engine
|
#include "include/core/SkColor.h"
#include "include/core/SkColorPriv.h"
#include "include/private/SkColorData.h"
#include "include/private/base/SkTPin.h"
#include "src/base/SkVx.h"
#include "src/core/SkSwizzlePriv.h"
#include <algorithm>
Go to the source code of this file.
Functions | |
SkPMColor | SkPreMultiplyARGB (U8CPU a, U8CPU r, U8CPU g, U8CPU b) |
SkPMColor | SkPreMultiplyColor (SkColor c) |
static SkScalar | ByteToScalar (U8CPU x) |
static SkScalar | ByteDivToScalar (int numer, U8CPU denom) |
void | SkRGBToHSV (U8CPU r, U8CPU g, U8CPU b, SkScalar hsv[3]) |
SkColor | SkHSVToColor (U8CPU a, const SkScalar hsv[3]) |
Definition at line 33 of file SkColor.cpp.
Definition at line 28 of file SkColor.cpp.
Converts HSV components to an ARGB color. Alpha is passed through unchanged. hsv[0] represents hsv hue, an angle from zero to less than 360. hsv[1] represents hsv saturation, and varies from zero to one. hsv[2] represents hsv value, and varies from zero to one.
Out of range hsv values are pinned.
alpha | alpha component of the returned ARGB color |
hsv | three element array which holds the input HSV components |
Definition at line 78 of file SkColor.cpp.
Returns a SkPMColor value from unpremultiplied 8-bit component values.
a | amount of alpha, from fully transparent (0) to fully opaque (255) |
r | amount of red, from no red (0) to full red (255) |
g | amount of green, from no green (0) to full green (255) |
b | amount of blue, from no blue (0) to full blue (255) |
Definition at line 17 of file SkColor.cpp.
Returns pmcolor closest to color c. Multiplies c RGB components by the c alpha, and arranges the bytes to match the format of kN32_SkColorType.
c | unpremultiplied ARGB color |
Definition at line 21 of file SkColor.cpp.
Converts RGB to its HSV components. hsv[0] contains hsv hue, a value from zero to less than 360. hsv[1] contains hsv saturation, a value from zero to one. hsv[2] contains hsv value, a value from zero to one.
red | red component value from zero to 255 |
green | green component value from zero to 255 |
blue | blue component value from zero to 255 |
hsv | three element array which holds the resulting HSV components |
Definition at line 38 of file SkColor.cpp.