Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: E.h iclass.c Log Message: Fix image class transparency (correctly this time). =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v retrieving revision 1.309 retrieving revision 1.310 diff -u -3 -r1.309 -r1.310 --- E.h 17 Jul 2004 22:17:19 -0000 1.309 +++ E.h 22 Jul 2004 21:12:04 -0000 1.310 @@ -66,9 +66,11 @@ #define ENABLE_TRANSPARENCY 1 #define ENABLE_THEME_TRANSPARENCY 1 -#define ICLASS_ATTR_OPAQUE 0 /* No transparency */ -#define ICLASS_ATTR_BG 1 /* Background transparency */ -#define ICLASS_ATTR_GLASS 2 /* Glass transparency */ +#define ICLASS_ATTR_OPAQUE 0x00 /* No transparency */ +#define ICLASS_ATTR_BG 0x01 /* Background transparency */ +#define ICLASS_ATTR_GLASS 0x02 /* Glass transparency */ +#define ICLASS_ATTR_NO_CLIP 0x04 /* Don't apply clip mask */ +#define ICLASS_ATTR_USE_CM 0x08 /* Use colormodifier */ #else =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/iclass.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -3 -r1.44 -r1.45 --- iclass.c 18 Jul 2004 19:53:23 -0000 1.44 +++ iclass.c 22 Jul 2004 21:12:04 -0000 1.45 @@ -439,8 +439,8 @@ break; } } -#else - trans = 0; + if (flags != ICLASS_ATTR_OPAQUE) + flags |= ICLASS_ATTR_USE_CM; #endif apply = !pmm; @@ -467,7 +467,7 @@ * 0x04: Don't apply image mask to result */ if (is->transparent && imlib_image_has_alpha()) - flags = (is->transparent & 0x02) ? ICLASS_ATTR_GLASS : ICLASS_ATTR_BG; + flags = is->transparent; trans = (flags != ICLASS_ATTR_OPAQUE); @@ -483,7 +483,7 @@ { /* Create the background base image */ bg = BackgroundGetPixmap(desks.desk[desks.current].bg); - if (flags == ICLASS_ATTR_GLASS || bg == None) + if ((flags & ICLASS_ATTR_GLASS) || (bg == None)) bg = VRoot.win; imlib_context_set_drawable(bg); ii = imlib_create_image_from_drawable(0, xx, yy, w, h, 1); @@ -495,6 +495,8 @@ { /* Eprintf("ImageStateMakePmapMask %#lx %d %d\n", win, w, h); */ } +#else + trans = 0; #endif if (is->pixmapfillstyle == FILL_STRETCH || trans) @@ -504,7 +506,7 @@ { imlib_context_set_blend(1); #ifdef ENABLE_THEME_TRANSPARENCY - if (flags != ICLASS_ATTR_OPAQUE) + if (flags & ICLASS_ATTR_USE_CM) { imlib_context_set_color_modifier(icm); } @@ -513,7 +515,7 @@ imlib_blend_image_onto_image(is->im, 0, 0, 0, ww, hh, 0, 0, w, h); imlib_context_set_blend(0); #ifdef ENABLE_THEME_TRANSPARENCY - if (flags != ICLASS_ATTR_OPAQUE) + if (flags & ICLASS_ATTR_USE_CM) { imlib_context_set_color_modifier(NULL); } @@ -526,7 +528,7 @@ pmm->type = 1; imlib_render_pixmaps_for_whole_image_at_size(&pmm->pmap, &pmm->mask, w, h); - if (ii && make_mask && (is->transparent & 0x04) == 0) + if (ii && make_mask && !(flags & ICLASS_ATTR_NO_CLIP)) { Pixmap pmap = 0, mask = 0; GC gc; ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs