summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_line_main.c
diff options
context:
space:
mode:
authorPaulo Alcantara <pcacjr@profusion.mobi>2012-11-29 20:48:24 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-11-29 20:48:24 +0000
commitcf1360416ed40f8c562b5647aa2dc7204b86d619 (patch)
treeddc5650b1dc406ac7d35731cf5ec895aa688e58e /src/lib/evas/common/evas_line_main.c
parenta9bdfcca37f56c70e4ee30cc9b8edf1752ac86f3 (diff)
evas/line: Refactor common code for line drawing
This patch refactors common code for line draws - so that it can be used by other engines and *threaded* X11. Signed-off-by: Paulo Alcantara <pcacjr@profusion.mobi> Patch by: Paulo Alcantara <pcacjr@profusion.mobi> SVN revision: 79854
Diffstat (limited to 'src/lib/evas/common/evas_line_main.c')
-rw-r--r--src/lib/evas/common/evas_line_main.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/lib/evas/common/evas_line_main.c b/src/lib/evas/common/evas_line_main.c
index 76417f5ac7..51f851b6ae 100644
--- a/src/lib/evas/common/evas_line_main.c
+++ b/src/lib/evas/common/evas_line_main.c
@@ -41,7 +41,7 @@ evas_common_line_init(void)
41} 41}
42 42
43EAPI void 43EAPI void
44evas_common_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) 44evas_common_line_draw_cb(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1, Evas_Common_Line_Draw_Cb cb)
45{ 45{
46 int x, y, w, h; 46 int x, y, w, h;
47 int clx, cly, clw, clh; 47 int clx, cly, clw, clh;
@@ -88,10 +88,7 @@ evas_common_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, in
88 dc->clip.w = clw; 88 dc->clip.w = clw;
89 dc->clip.h = clh; 89 dc->clip.h = clh;
90 90
91 if (dc->anti_alias) 91 cb(dst, dc, x0, y0, x1, y1);
92 _evas_draw_line_aa(dst, dc, x0, y0, x1, y1);
93 else
94 _evas_draw_line(dst, dc, x0, y0, x1, y1);
95 92
96 /* restore clip info */ 93 /* restore clip info */
97 dc->clip.use = cuse; 94 dc->clip.use = cuse;
@@ -101,6 +98,14 @@ evas_common_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, in
101 dc->clip.h = ch; 98 dc->clip.h = ch;
102} 99}
103 100
101EAPI void
102evas_common_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
103{
104 Evas_Common_Line_Draw_Cb cb;
105
106 cb = dc->anti_alias ? _evas_draw_line_aa : _evas_draw_line;
107 evas_common_line_draw_cb(dst, dc, x0, y0, x1, y1, cb);
108}
104 109
105static void 110static void
106_evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y) 111_evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y)