Converted spaces to tabs.
This commit is contained in:
parent
d16b4df7fd
commit
466ab4b19a
32
src/nanovg.c
32
src/nanovg.c
@ -285,8 +285,8 @@ struct NVGcolor nvgRGB(unsigned char r, unsigned char g, unsigned char b)
|
||||
|
||||
struct NVGcolor nvgRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
|
||||
{
|
||||
struct NVGcolor color = {r/255.0f, g/255.0f, b/255.0f, a/255.0f};
|
||||
return color;
|
||||
struct NVGcolor color = {r/255.0f, g/255.0f, b/255.0f, a/255.0f};
|
||||
return color;
|
||||
}
|
||||
|
||||
struct NVGcolor nvgTransRGBA(struct NVGcolor c, unsigned char a)
|
||||
@ -297,16 +297,16 @@ struct NVGcolor nvgTransRGBA(struct NVGcolor c, unsigned char a)
|
||||
|
||||
struct NVGcolor nvgLerpRGBA(struct NVGcolor c0, struct NVGcolor c1, float u)
|
||||
{
|
||||
int i;
|
||||
float oneminu;
|
||||
struct NVGcolor cint;
|
||||
int i;
|
||||
float oneminu;
|
||||
struct NVGcolor cint;
|
||||
|
||||
u = nvg__clampf(u, 0.0f, 1.0f);
|
||||
oneminu = 1.0f - u;
|
||||
for( i = 0; i <4; ++i )
|
||||
{
|
||||
cint.rgba[i] = c0.rgba[i] * oneminu + c1.rgba[i] * u;
|
||||
}
|
||||
oneminu = 1.0f - u;
|
||||
for( i = 0; i <4; ++i )
|
||||
{
|
||||
cint.rgba[i] = c0.rgba[i] * oneminu + c1.rgba[i] * u;
|
||||
}
|
||||
|
||||
return cint;
|
||||
}
|
||||
@ -342,17 +342,17 @@ struct NVGcolor nvgHSLA(float h, float s, float l, unsigned char a)
|
||||
col.r = nvg__clampf(nvg__hue(h + 1.0f/3.0f, m1, m2), 0.0f, 1.0f);
|
||||
col.g = nvg__clampf(nvg__hue(h, m1, m2), 0.0f, 1.0f);
|
||||
col.b = nvg__clampf(nvg__hue(h - 1.0f/3.0f, m1, m2), 0.0f, 1.0f);
|
||||
col.a = a/255.0f;
|
||||
col.a = a/255.0f;
|
||||
return col;
|
||||
}
|
||||
|
||||
int nvgIsBlack( struct NVGcolor col )
|
||||
{
|
||||
if( col.r == 0.0f && col.g == 0.0f && col.b == 0.0f && col.a == 0.0f )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
if( col.r == 0.0f && col.g == 0.0f && col.b == 0.0f && col.a == 0.0f )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct NVGstate* nvg__getState(struct NVGcontext* ctx)
|
||||
|
16
src/nanovg.h
16
src/nanovg.h
@ -29,14 +29,14 @@ struct NVGcontext;
|
||||
|
||||
struct NVGcolor
|
||||
{
|
||||
union
|
||||
{
|
||||
float rgba[4];
|
||||
struct
|
||||
{
|
||||
float r,g,b,a;
|
||||
};
|
||||
};
|
||||
union
|
||||
{
|
||||
float rgba[4];
|
||||
struct
|
||||
{
|
||||
float r,g,b,a;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
struct NVGpaint
|
||||
|
Loading…
x
Reference in New Issue
Block a user