forked from enlightenment/efl
parent
4e1ea67122
commit
87d707ee2c
|
@ -299,7 +299,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
|
|||
#define SETUP_LINE_SHALLOW \
|
||||
if (x0 > x1) \
|
||||
{ \
|
||||
EXCHANGE_POINTS(x0, y0, x1, y1) \
|
||||
EXCHANGE_POINTS(x0, y0, x1, y1); \
|
||||
dx = -dx; \
|
||||
dy = -dy; \
|
||||
} \
|
||||
|
@ -338,7 +338,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
|
|||
} \
|
||||
\
|
||||
y = 0; \
|
||||
if ((dely > 0) && (py < -1)) \
|
||||
if ((dely > 0) && (py < 0)) \
|
||||
y = (-1 - py); \
|
||||
else if ((dely < 0) && (py >= clh)) \
|
||||
y = (clh - 1 - py); \
|
||||
|
@ -374,7 +374,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
|
|||
#define SETUP_LINE_STEEP \
|
||||
if (y0 > y1) \
|
||||
{ \
|
||||
EXCHANGE_POINTS(x0, y0, x1, y1) \
|
||||
EXCHANGE_POINTS(x0, y0, x1, y1); \
|
||||
dx = -dx; \
|
||||
dy = -dy; \
|
||||
} \
|
||||
|
@ -442,8 +442,6 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
|
|||
by = MIN(y1 + 1, clh); \
|
||||
rx = clw - 1;
|
||||
|
||||
|
||||
|
||||
static void
|
||||
_evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
|
||||
{
|
||||
|
@ -485,7 +483,7 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1,
|
|||
/* shallow: x-parametric */
|
||||
if ((dy < dx) || (dy < -dx))
|
||||
{
|
||||
SETUP_LINE_SHALLOW
|
||||
SETUP_LINE_SHALLOW;
|
||||
|
||||
while (px < rx)
|
||||
{
|
||||
|
@ -523,7 +521,7 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1,
|
|||
|
||||
/* steep: y-parametric */
|
||||
|
||||
SETUP_LINE_STEEP
|
||||
SETUP_LINE_STEEP;
|
||||
|
||||
while (py < by)
|
||||
{
|
||||
|
@ -571,7 +569,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
|
|||
RGBA_Gfx_Pt_Func pfunc;
|
||||
|
||||
if (y0 > y1)
|
||||
EXCHANGE_POINTS(x0, y0, x1, y1)
|
||||
EXCHANGE_POINTS(x0, y0, x1, y1);
|
||||
dx = x1 - x0;
|
||||
dy = y1 - y0;
|
||||
|
||||
|
@ -602,7 +600,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
|
|||
/* shallow: x-parametric */
|
||||
if ((dy < dx) || (dy < -dx))
|
||||
{
|
||||
SETUP_LINE_SHALLOW
|
||||
SETUP_LINE_SHALLOW;
|
||||
|
||||
while (px < rx)
|
||||
{
|
||||
|
@ -642,8 +640,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
|
|||
}
|
||||
|
||||
/* steep: y-parametric */
|
||||
|
||||
SETUP_LINE_STEEP
|
||||
SETUP_LINE_STEEP;
|
||||
|
||||
while (py < by)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue