]> Dogcows Code - chaz/openbox/commitdiff
there's the rect grad. now stop bugging me :(
authorDerek Foreman <manmower@gmail.com>
Sun, 18 May 2003 23:27:31 +0000 (23:27 +0000)
committerDerek Foreman <manmower@gmail.com>
Sun, 18 May 2003 23:27:31 +0000 (23:27 +0000)
render/gradient.c

index 4b89434fed06999756f64017c7e30c93ec50fe61..e669a2c482ae21f848502ee88dd62a2fe22029af 100644 (file)
@@ -397,7 +397,7 @@ void gradient_rectangle(Surface *sf, int inw, int inh)
     dby = dbx/(float)h;
     dbx/= (float)w;
     for (x = 0; x < w; ++x, data) {
-      if (drx * x < dry * y) val = (int)(drx * x);
+      if ((float)x/(float)w < (float)y/(float)h) val = (int)(drx * x);
       else val = (int)(dry * y);
 
       r = sf->data.planar.primary->r + val;
This page took 0.023971 seconds and 4 git commands to generate.