]> Pileus Git - ~andy/gtk/blobdiff - gdk/linux-fb/mizerline.c
Take thickness into account in the size allocation of the child widgets in
[~andy/gtk] / gdk / linux-fb / mizerline.c
index 8b82a219eee9ba13e71b0656b5fcdea63fc8168d..c9a5ce163f4472d3e5064caad46c3f24c9f2913e 100644 (file)
@@ -43,6 +43,7 @@ SOFTWARE.
 ******************************************************************/
 /* $TOG: mizerline.c /main/18 1998/02/09 14:49:45 kaleb $ */
 
+#include <config.h>
 #include "mi.h"
 #include "miline.h"
 
@@ -79,27 +80,22 @@ SOFTWARE.
        spans->x = xx;\
        spans->y = yy;\
         spans->width = 1; \
-        spans->height = 1; \
        current_y = yy;\
         new_span = FALSE;\
     }\
 }
 
 void
-miZeroLine(pDraw, pGC, mode, npt, pptInit)
-    GdkDrawable* pDraw;
-    GdkGC*     pGC;
-    int                mode;           /* Origin or Previous */
-    int                npt;            /* number of points */
-    GdkPoint* pptInit;
+miZeroLine(GdkDrawable *pDraw, GdkGC *pGC,
+           int mode, int npt, GdkPoint *pptInit)
 {
-    int Nspans, current_y;
+    int Nspans, current_y = 0;
     GdkPoint* ppt; 
-    GdkRectangle* pspanInit, *spans;
+    GdkSpan* pspanInit, *spans;
     int list_len;
     int xleft, ytop, xright, ybottom;
     int new_x1, new_y1, new_x2, new_y2;
-    int x, y, x1, y1, x2, y2, xstart, ystart;
+    int x = 0, y = 0, x1, y1, x2, y2, xstart, ystart;
     int oc1, oc2;
     int result;
     int pt1_clipped, pt2_clipped = 0;
@@ -130,7 +126,7 @@ miZeroLine(pDraw, pGC, mode, npt, pptInit)
     width = xright - xleft + 1;
     height = ybottom - ytop + 1;
     list_len = (height >= width) ? height : width;
-    pspanInit = (GdkRectangle*)ALLOCATE_LOCAL(list_len * sizeof(GdkRectangle));
+    pspanInit = (GdkSpan*)ALLOCATE_LOCAL(list_len * sizeof(GdkSpan));
     if (!pspanInit)
        return;
 
@@ -153,7 +149,7 @@ miZeroLine(pDraw, pGC, mode, npt, pptInit)
     while (--npt > 0)
     {
        if (Nspans > 0)
-         gdk_fb_fill_spans(pDraw, pGC, pspanInit, Nspans);
+         gdk_fb_fill_spans(pDraw, pGC, pspanInit, Nspans, FALSE);
        Nspans = 0;
        new_span = TRUE;
        spans  = pspanInit - 1;
@@ -312,18 +308,14 @@ miZeroLine(pDraw, pGC, mode, npt, pptInit)
     }    
 
     if (Nspans > 0)
-      gdk_fb_fill_spans(pDraw, pGC, pspanInit, Nspans);
+      gdk_fb_fill_spans(pDraw, pGC, pspanInit, Nspans, FALSE);
 
     DEALLOCATE_LOCAL(pspanInit);
 }
 
 void
-miZeroDashLine(dst, pgc, mode, nptInit, pptInit)
-GdkDrawable* dst;
-GdkGC* pgc;
-int mode;
-int nptInit;           /* number of points in polyline */
-GdkPoint *pptInit;     /* points in the polyline */
+miZeroDashLine(GdkDrawable *dst, GdkGC *pgc,
+               int mode, int nptInit, GdkPoint *pptInit)
 {
     /* XXX kludge until real zero-width dash code is written */
     GDK_GC_FBDATA(pgc)->values.line_width = 1;