#define IN_RANGE(x, y, w, h) \
- ( ((unsigned)(x) < (unsigned)(w)) && ((unsigned)(y) < (unsigned)(h)) )
-
-#define IN_RECT(x, y, rx, ry, rw, rh) \
-( ((unsigned)((x) - (rx)) < (unsigned)(rw)) && \
- ((unsigned)((y) - (ry)) < (unsigned)(rh)) )
-
-#define EXCHANGE_POINTS(x0, y0, x1, y1) \
-{ \
- int _tmp = y0; \
- \
- y0 = y1; \
- y1 = _tmp; \
- \
- _tmp = x0; \
- x0 = x1; \
- x1 = _tmp; \
-}
+ ( x > 0 && y > 0 &&((unsigned)(x) < (unsigned)(w)) && ((unsigned)(y) < (unsigned)(h)) )
+
+#define IN_RECT(x, y, rx, ry, rw, rh) \
+ ( ((unsigned)((x) - (rx)) < (unsigned)(rw)) && \
+ ((unsigned)((y) - (ry)) < (unsigned)(rh)) )
+
+#define EXCHANGE_POINTS(x0, y0, x1, y1) \
+ { \
+ int _tmp = y0; \
+ \
+ y0 = y1; \
+ y1 = _tmp; \
+ \
+ _tmp = x0; \
+ x0 = x1; \
+ x1 = _tmp; \
+ }
EAPI void
if ((py < 0) && (dely < 0)) return;
if ((py > by) && (dely > 0)) return;
}
+ if (!p0_in)
+ {
+ if (py < 0) goto next_x;
+ }
#ifdef EVAS_SLI
if (((py) % dc->sli.h) == dc->sli.y)
#endif
if (IN_RANGE(px, py, clw, clh))
pfunc(0, 255, color, p);
}
+ next_x:
yy += dyy;
px++;
p++;
if ((px < 0) && (delx < 0)) return;
if ((px > rx) && (delx > 0)) return;
}
+ if (!p0_in)
+ {
+ if (px < 0) goto next_y;
+ }
#ifdef EVAS_SLI
if (((py) % dc->sli.h) == dc->sli.y)
#endif
if (IN_RANGE(px, py, clw, clh))
pfunc(0, 255, color, p);
}
+ next_y:
xx += dxx;
py++;
p += dstw;
}
if (!p1_in)
{
- if ((py <= -1) && (dely < 0)) return;
+ if ((py < 0) && (dely < 0)) return;
if ((py > by) && (dely > 0)) return;
}
- if ((px) < clw)
+ if (!p0_in)
+ {
+ if (py < 0) goto next_x;
+ }
+ if (px < clw)
{
aa = ((yy - (y << 16)) >> 8);
if ((py) < clh)
if ((py + 1) < clh)
pfunc(0, aa, color, p + dstw);
}
+
+ next_x:
yy += dyy;
px++;
p++;
}
if (!p1_in)
{
- if ((px <= -1) && (delx < 0)) return;
+ if ((px < 0) && (delx < 0)) return;
if ((px > rx) && (delx > 0)) return;
}
- if ((py) < clh)
+ if (!p0_in)
+ {
+ if (px < 0) goto next_y;
+ }
+ if (py < clh)
{
aa = ((xx - (x << 16)) >> 8);
if ((px) < clw)
if ((px + 1) < clw)
pfunc(0, aa, color, p + 1);
}
+ next_y:
xx += dxx;
py++;
p += dstw;