Enlightenment CVS committal Author : rephorm Project : e17 Module : libs/edje
Dir : e17/libs/edje/src/lib Modified Files: edje_calc.c edje_data.c edje_private.h Log Message: add cedric bail's fill.type patch. you can now include "type: TILE;" in the fill block to tile an image part at the size of its image data =================================================================== RCS file: /cvs/e/e17/libs/edje/src/lib/edje_calc.c,v retrieving revision 1.102 retrieving revision 1.103 diff -u -3 -r1.102 -r1.103 --- edje_calc.c 27 May 2007 05:28:07 -0000 1.102 +++ edje_calc.c 6 Jul 2007 22:36:40 -0000 1.103 @@ -974,13 +974,26 @@ params->smooth = desc->fill.smooth; if (flags & FLAG_X) { - params->fill.x = desc->fill.pos_abs_x + (params->w * desc->fill.pos_rel_x); - params->fill.w = desc->fill.abs_x + (params->w * desc->fill.rel_x); + int fw; + + if (desc->fill.type == EDJE_FILL_TYPE_TILE) + evas_object_image_size_get(ep->object, &fw, NULL); + else + fw = params->w; + + params->fill.x = desc->fill.pos_abs_x + (fw * desc->fill.pos_rel_x); + params->fill.w = desc->fill.abs_x + (fw * desc->fill.rel_x); } if (flags & FLAG_Y) { - params->fill.y = desc->fill.pos_abs_y + (params->h * desc->fill.pos_rel_y); - params->fill.h = desc->fill.abs_y + (params->h * desc->fill.rel_y); + int fh; + if (desc->fill.type == EDJE_FILL_TYPE_TILE) + evas_object_image_size_get(ep->object, NULL, &fh); + else + fh = params->h; + + params->fill.y = desc->fill.pos_abs_y + (fh * desc->fill.pos_rel_y); + params->fill.h = desc->fill.abs_y + (fh * desc->fill.rel_y); } params->fill.angle = desc->fill.angle; params->fill.spread = desc->fill.spread; =================================================================== RCS file: /cvs/e/e17/libs/edje/src/lib/edje_data.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -3 -r1.36 -r1.37 --- edje_data.c 27 May 2007 05:28:07 -0000 1.36 +++ edje_data.c 6 Jul 2007 22:36:40 -0000 1.37 @@ -293,6 +293,7 @@ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.abs_y", fill.abs_y, EET_T_INT); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.angle", fill.angle, EET_T_INT); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.spread", fill.spread, EET_T_INT); + EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.type", fill.type, EET_T_CHAR); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color_class", color_class, EET_T_STRING); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.r", color.r, EET_T_UCHAR); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.g", color.g, EET_T_UCHAR); =================================================================== RCS file: /cvs/e/e17/libs/edje/src/lib/edje_private.h,v retrieving revision 1.126 retrieving revision 1.127 diff -u -3 -r1.126 -r1.127 --- edje_private.h 28 Jun 2007 23:22:20 -0000 1.126 +++ edje_private.h 6 Jul 2007 22:36:40 -0000 1.127 @@ -504,6 +504,7 @@ int angle; /* angle of fill -- currently only used by grads */ int spread; /* spread of fill -- currently only used by grads */ char smooth; /* fill with smooth scaling or not */ + unsigned char type; /* fill coordinate from container (SCALE) or from source image (TILE) */ } fill; char *color_class; /* how to modify the color */ @@ -883,6 +884,12 @@ int id; unsigned char *msg; }; + +typedef enum _Edje_Fill +{ + EDJE_FILL_TYPE_SCALE = 0, + EDJE_FILL_TYPE_TILE +} Edje_Fill; EAPI extern Eet_Data_Descriptor *_edje_edd_edje_file; EAPI extern Eet_Data_Descriptor *_edje_edd_edje_style; ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs