]> Dogcows Code - chaz/openbox/blobdiff - render/gradient.c
add PARTIAL_SRUT_EQUAL
[chaz/openbox] / render / gradient.c
index c2f7fac73cce4f8528617a6b97c01eb790b670bc..fa54fbb25b657929047d76ff70be57ccdfe88a6f 100644 (file)
@@ -1,3 +1,22 @@
+/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
+
+   gradient.c for the Openbox window manager
+   Copyright (c) 2003        Ben Jansens
+   Copyright (c) 2003        Derek Foreman
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   See the COPYING file for a copy of the GNU General Public License.
+*/
+
 #include "render.h"
 #include "gradient.h"
 #include "color.h"
@@ -42,6 +61,22 @@ void RrRender(RrAppearance *a, int w, int h)
         return;
     }
   
+    if (a->surface.interlaced) {
+        int i;
+        RrPixel32 *p;
+
+        r = a->surface.interlace_color->r;
+        g = a->surface.interlace_color->g;
+        b = a->surface.interlace_color->b;
+        current = (r << RrDefaultRedOffset)
+            + (g << RrDefaultGreenOffset)
+            + (b << RrDefaultBlueOffset);
+        p = data;
+        for (i = 0; i < h; i += 2, p += w)
+            for (x = 0; x < w; ++x, ++p)
+                *p = current;
+    }
+
     if (a->surface.relief == RR_RELIEF_FLAT && a->surface.border) {
         r = a->surface.border_color->r;
         g = a->surface.border_color->g;
@@ -82,23 +117,6 @@ void RrRender(RrAppearance *a, int w, int h)
                           a->surface.relief==RR_RELIEF_RAISED);
         }
     }
-
-    if (a->surface.interlaced) {
-        int i;
-        RrPixel32 *p;
-
-        r = a->surface.interlace_color->r;
-        g = a->surface.interlace_color->g;
-        b = a->surface.interlace_color->b;
-        current = (r << RrDefaultRedOffset)
-            + (g << RrDefaultGreenOffset)
-            + (b << RrDefaultBlueOffset);
-        p = data;
-        for (i = 0; i < h; i += 2, p += w)
-            for (x = 0; x < w; ++x, ++p)
-                *p = current;
-    }
-
 }
 
 static void highlight(RrPixel32 *x, RrPixel32 *y, gboolean raised)
This page took 0.021169 seconds and 4 git commands to generate.