Enlightenment CVS committal Author : turran Project : e17 Module : proto/enesim
Dir : e17/proto/enesim/src/lib Modified Files: Enesim.h enesim_private.h Log Message: + Change how fixed point headers should be (16p16 only) + Remove scanline directory completely, the API is better now without it + Jose's code: Add support for surface draw transformation/scaling (only affine transformations for now). the API has to be changed again. + Add an examples directory (still have to merge it with svn code) but is usable + All the rop directory is also removed, now each backend has its own dir. Now we can reuse the code better. + Add more code to the utils dir, rectangle to easily handle clips, intersections, etc. Better than macros =================================================================== RCS file: /cvs/e/e17/proto/enesim/src/lib/Enesim.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- Enesim.h 10 Dec 2007 23:04:04 -0000 1.6 +++ Enesim.h 27 Dec 2007 15:14:27 -0000 1.7 @@ -22,6 +22,8 @@ # endif #endif +#include "rectangle.h" + /** * @mainpage Enesim * @section intro Introduction @@ -52,25 +54,7 @@ typedef unsigned int DATA32; typedef unsigned short int DATA16; typedef unsigned char DATA8; -typedef struct _Enesim_Rectangle -{ - int x; - int y; - int w; - int h; -} Enesim_Rectangle; -/** - * To be documented - * FIXME: To be fixed - */ -static inline void enesim_rectangle_from_coords(Enesim_Rectangle *r, int x, int y, int w, int h) -{ - r->x = x; - r->y = y; - r->w = w; - r->h = h; -} /** * @defgroup Enesim_Scanline_Group Scanline @@ -182,8 +166,8 @@ EAPI int enesim_surface_flag_get(Enesim_Surface *s); EAPI void enesim_surface_flag_set(Enesim_Surface *s, Enesim_Surface_Flag flags); EAPI void enesim_surface_data_set(Enesim_Surface *s, Enesim_Surface_Format f, ...); -//EAPI void enesim_surface_resize(Enesim_Surface *s, Enesim_Rectangle *srect, Enesim_Surface *d, Enesim_Rectangle *drect, int mode); - +EAPI void enesim_surface_delete(Enesim_Surface *s); +EAPI void enesim_surface_draw(Enesim_Surface *s, Enesim_Rectangle *srect, Enesim_Surface *d, Enesim_Rectangle *drect, int mode, int smooth); /** @} */ //End of Enesim_Surface_Group /** =================================================================== RCS file: /cvs/e/e17/proto/enesim/src/lib/enesim_private.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- enesim_private.h 10 Dec 2007 23:04:04 -0000 1.6 +++ enesim_private.h 27 Dec 2007 15:14:27 -0000 1.7 @@ -8,13 +8,14 @@ #include <stdlib.h> #include <limits.h> -//#include "Edata.h" + + +#define DEBUG #ifndef DEBUG #define NDEBUG #define ENESIM_WARNING(format, ...) #else -#define #define ENESIM_WARNING(format, ...) \ fprintf(stderr, "[Enesim] (%s:%d - %s()):\n" format "\n\n", __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__) #endif @@ -28,31 +29,6 @@ /* FIXME move the above to other place */ -/** - * To be documented - * FIXME: To be fixed - */ -static inline int enesim_rectangle_is_empty(Enesim_Rectangle *r) -{ - return ((r->w < 1) || (r->h < 1)); -} -/** - * To be documented - * FIXME: To be fixed - */ -static inline int enesim_spans_common(int c1, int l1, int c2, int l2) -{ - return (!(((c2 + l2) <= c1) || (c2 >= (c1 + l1)))); -} -/** - * To be documented - * FIXME: To be fixed - */ -static inline int enesim_rects_intersect(int x, int y, int w, int h, int xx, - int yy, int ww, int hh) -{ - return (enesim_spans_common(x, w, xx, ww) && enesim_spans_common(y, h, yy, hh)); -} /** * To be documented * FIXME: To be fixed ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs