Enlightenment CVS committal Author : turran Project : e17 Module : proto/enesim
Dir : e17/proto/enesim/src/lib/raster/renderer Modified Files: fill_surface.c Log Message: + Code some of the path component stubs + Simplify the fill surface code =================================================================== RCS file: /cvs/e/e17/proto/enesim/src/lib/raster/renderer/fill_surface.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- fill_surface.c 19 Oct 2007 16:21:07 -0000 1.3 +++ fill_surface.c 21 Oct 2007 22:39:28 -0000 1.4 @@ -18,70 +18,41 @@ Enesim_Rectangle darea; } Fill_Surface; +#define DRECT f->darea +#define SRECT f->sarea static inline void _draw_alias_sl(Fill_Surface *f, Scanline_Alias_Sl *sl, Enesim_Surface *dst) { int offset; + int w = DRECT.w; + int h; -#define DRECT f->darea -#define SRECT f->sarea - /* - * +---+---+ +---+---+ - * | S | S | | S | | - * +---+---+ +---+ | - * | | | | - * +-------+ +-------+ - */ + if (!(f->mode & ENESIM_SURFACE_REPEAT_X)) + { + w = MIN(SRECT.w, DRECT.w); + } if (!(f->mode & ENESIM_SURFACE_REPEAT_Y)) { - /* scanline outside vertical area */ - if (sl->y > DRECT.y + SRECT.h - 1) - { - // FIXME fill base color ? - return; - } - /* scanline inside vertical area */ + h = MIN(SRECT.h, DRECT.h); offset = ((sl->y - DRECT.y) + SRECT.y) * f->s->w + SRECT.x; } - /* - * +---+---+ +---+---+ - * | S | | | S | S | - * +---+ + +---+---+ - * | S | | | S | S | - * +-------+ +-------+ - */ else { - /* scanline inside vertical area */ - offset = (((sl->y - DRECT.y) % SRECT.h) + SRECT.y) * f->s->w + SRECT.x; + h = DRECT.h; + offset = (((sl->y - DRECT.y) % SRECT.h) + SRECT.y) * f->s->w + SRECT.x; } - /* - * +---+---+ +---+---+ - * | S | | | S | | - * +---+ + +---+ | - * | S | | | | - * +-------+ +-------+ - */ - /* simple cases are done, now the complex ones */ - if (!(f->mode & ENESIM_SURFACE_REPEAT_X)) + if (!enesim_rects_intersect(sl->x, sl->y, sl->w, 1, DRECT.x, DRECT.y, w, + h)) + { + // FIXME fill base color ? + } + if (f->mode & ENESIM_SURFACE_REPEAT_X) { - /* scanline inside horizontal area */ - /* scanline outside horizontal area */ + } - /* - * +---+---+ +---+---+ - * | S | S | | S | S | - * +---+---+ +---+---| - * | | | S | S | - * +-------+ +-------+ - */ else { - /* check if the scanline is inside the dst rect - * +---+ +---+ +---+ +---+ - * | Ds|--- s---|-D | s-|-D-|- |sD | - * +---+ +---- +---+ +---+ - */ + } } ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs