Commit 23121ffb authored by Mukund Sivaraman's avatar Mukund Sivaraman

color-to-alpha: Indent code to our style (contd.)

parent 7e420a45
......@@ -91,9 +91,9 @@ color_to_alpha (gfloat *color,
temp[3] = src[offset + 3];
src[offset+3] = temp[3];
for (i=0; i<3; i++)
if (color[i] < 0.0001)
{
if (color[i] < 1.e-4f)
temp[i] = src[offset+i];
else if (src[offset+i] > color[i])
temp[i] = (src[offset+i] - color[i]) / (1.0 - color[i]);
......@@ -101,6 +101,7 @@ color_to_alpha (gfloat *color,
temp[i] = (color[i] - src[offset+i]) / color[i];
else
temp[i] = 0.0;
}
if (temp[0] > temp[1])
{
......@@ -114,13 +115,13 @@ color_to_alpha (gfloat *color,
else
src[offset+3] = temp[2];
if (src[offset+3] < 0.0001)
if (src[offset+3] < 1.e-4f)
return;
for (i=0; i<3; i++)
src[offset+i] = (src[offset+i] - color[i]) / src[offset+3] + color[i];
src[offset+3] *=temp[3];
src[offset+3] *= temp[3];
}
......@@ -133,7 +134,6 @@ process (GeglOperation *operation,
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
Babl *format = babl_format ("RGBA float");
gfloat *src_buf, color[4];
gint x;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment