clip colors apply to style colors now too

SVN revision: 18652
This commit is contained in:
Carsten Haitzler 2005-11-26 15:56:51 +00:00
parent 0b90bc4c04
commit ca12b981bb
1 changed files with 14 additions and 8 deletions

View File

@ -1221,8 +1221,7 @@ evas_object_text_render(Evas_Object *obj, void *output, void *context, void *sur
/* render object to surface with context, and offxet by x,y */
o = (Evas_Object_Text *)(obj->object_data);
ENFN->context_multiplier_unset(output,
context);
ENFN->context_multiplier_unset(output, context);
/*
ENFN->context_color_set(output,
context,
@ -1236,19 +1235,26 @@ evas_object_text_render(Evas_Object *obj, void *output, void *context, void *sur
obj->cur.cache.geometry.h);
*/
#define COLOR_SET(object, sub, col) \
#define COLOR_ONLY_SET(object, sub, col) \
ENFN->context_color_set(output, context, \
object->sub.col.r, \
object->sub.col.g, \
object->sub.col.b, \
object->sub.col.a);
#define COLOR_SET(object, sub, col) \
ENFN->context_color_set(output, context, \
((int)object->sub.col.r * ((int)obj->cur.clipper->cur.cache.clip.r + 1)) >> 8, \
((int)object->sub.col.g * ((int)obj->cur.clipper->cur.cache.clip.g + 1)) >> 8, \
((int)object->sub.col.b * ((int)obj->cur.clipper->cur.cache.clip.b + 1)) >> 8, \
((int)object->sub.col.a * ((int)obj->cur.clipper->cur.cache.clip.a + 1)) >> 8);
#define COLOR_SET_AMUL(object, sub, col, amul) \
ENFN->context_color_set(output, context, \
object->sub.col.r, \
object->sub.col.g, \
object->sub.col.b, \
((int)object->sub.col.a * (amul)) / 255);
((int)object->sub.col.r * ((int)obj->cur.clipper->cur.cache.clip.r + 1)) >> 8, \
((int)object->sub.col.g * ((int)obj->cur.clipper->cur.cache.clip.g + 1)) >> 8, \
((int)object->sub.col.b * ((int)obj->cur.clipper->cur.cache.clip.b + 1)) >> 8, \
((((int)object->sub.col.a * ((int)obj->cur.clipper->cur.cache.clip.a + 1)) >> 8) * amul) / 255);
#define DRAW_TEXT(ox, oy) \
if ((o->engine_data) && (o->cur.text)) \
@ -1357,7 +1363,7 @@ evas_object_text_render(Evas_Object *obj, void *output, void *context, void *sur
}
/* normal text */
COLOR_SET(obj, cur.cache, clip);
COLOR_ONLY_SET(obj, cur.cache, clip);
DRAW_TEXT(0, 0);
}