******************************************************************/
/* $TOG: mizerline.c /main/18 1998/02/09 14:49:45 kaleb $ */
+#include <config.h>
#include "mi.h"
#include "miline.h"
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;
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;
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;
}
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;