while(nextKey && percent > nextKey->percent)
{
- key = nextKey; keyNum = nextKeyNum;
-
- if(keyNum < numKeys - 1)
- {
+ key = nextKey; keyNum = nextKeyNum;
+
+ if(keyNum < numKeys - 1)
+ {
nextKey = key + 1;
- nextKeyNum = keyNum + 1;
+ nextKeyNum = keyNum + 1;
}
else
break;
if(nextKey && nextKey->percent != key->percent)
{
- float scale = ease((percent - key->percent) / (nextKey->percent - key->percent),
+ float scale = ease((percent - key->percent) / (nextKey->percent - key->percent),
smoothness, smoothness);
int cr = key->color.color.r;
int cg = key->color.color.g;
}
}
-float ease(float t, float a, float b)
+float ease(float t, float a, float b)
{
float k;
float s = a + b;
if (s == 0.0f) return t;
- if (s > 1.0f)
+ if (s > 1.0f)
{
a /= s;
b /= s;
get
{
return ((LFBSurface)driverData).bitmap;
- }
+ }
}
ColorAlpha GetPixel(int x, int y)
va_end(args);
}
}
-
+
void Bevel(bool inner, int x, int y, int w, int h)
{
ColorAlpha foreground = this.foreground;
if(boxLeft > firstPixel)
{
percent = (boxLeft - firstPixel) * inc;
- firstPixel = boxLeft;
+ firstPixel = boxLeft;
}
if(boxRight < lastPixel)
lastPixel = boxRight;
while(nextKey && percent > nextKey->percent)
{
- key = nextKey; keyNum = nextKeyNum;
-
- if(keyNum < numKeys - 1)
- {
+ key = nextKey; keyNum = nextKeyNum;
+
+ if(keyNum < numKeys - 1)
+ {
nextKey = key + 1;
- nextKeyNum = keyNum + 1;
+ nextKeyNum = keyNum + 1;
}
else
break;
if(nextKey && nextKey->percent != key->percent)
{
- float scale = ease((percent - key->percent) / (nextKey->percent - key->percent),
+ float scale = ease((percent - key->percent) / (nextKey->percent - key->percent),
smoothness, smoothness);
int cr = key->color.color.r;
int cg = key->color.color.g;