Added nvgTransRGBAf

This commit is contained in:
Doug Binks 2014-04-10 12:16:28 +02:00
parent a83913bc87
commit 253dc627e7
2 changed files with 9 additions and 0 deletions

View File

@ -306,6 +306,12 @@ struct NVGcolor nvgTransRGBA(struct NVGcolor c, unsigned char a)
return c;
}
struct NVGcolor nvgTransRGBAf(struct NVGcolor c, float a)
{
c.a = a;
return c;
}
struct NVGcolor nvgLerpRGBA(struct NVGcolor c0, struct NVGcolor c1, float u)
{
int i;

View File

@ -133,6 +133,9 @@ struct NVGcolor nvgLerpRGBA(struct NVGcolor c0, struct NVGcolor c1, float u);
// Sets transparency of a color value.
struct NVGcolor nvgTransRGBA(struct NVGcolor c0, unsigned char a);
// Sets transparency of a color value.
struct NVGcolor nvgTransRGBAf(struct NVGcolor c0, float a);
// Returns color value specified by hue, saturation and lightness.
// HSL values are all in range [0..1], alpha will be set to 255.
struct NVGcolor nvgHSL(float h, float s, float l);