evas: Fix text effect which has shadow direction

Summary:
If text object has outline and shadow effect (OUTLINE_SHADOW or OUTLINE_SOFT_SHADOW), and has shadow direction except BOTTOM_RIGHT then outline is not displayed.
So fix logic of style checking.

OUTLINE_SOFT_SHADOW effect of text object is different with text block, so fix it.

Test Plan: Make text obect with OUTLINE_SHADOW or OUTLINE_SOFT_SHADOW effect with any direction except BOTTOM_RIGHT

Reviewers: cedric, woohyun, herdsman, tasn

Subscribers: id213sin

Differential Revision: https://phab.enlightenment.org/D3047
This commit is contained in:
Minwoo, Lee 2015-11-23 20:53:29 +09:00 committed by Jean-Philippe Andre
parent ecb40c64b5
commit 3700be959b
1 changed files with 7 additions and 3 deletions

View File

@ -1791,8 +1791,12 @@ evas_object_text_render(Evas_Object *eo_obj,
switch (o->cur.style & EVAS_TEXT_STYLE_MASK_BASIC)
{
case EVAS_TEXT_STYLE_SHADOW:
shad_dst = 1;
haveshad = 1;
break;
case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW:
shad_dst = 1;
shad_sz = 2;
haveshad = 1;
break;
case EVAS_TEXT_STYLE_OUTLINE_SHADOW:
@ -1909,9 +1913,9 @@ evas_object_text_render(Evas_Object *eo_obj,
}
/* outlines */
if ((o->cur.style == EVAS_TEXT_STYLE_OUTLINE) ||
(o->cur.style == EVAS_TEXT_STYLE_OUTLINE_SHADOW) ||
(o->cur.style == EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW))
if (((o->cur.style & EVAS_TEXT_STYLE_MASK_BASIC) == EVAS_TEXT_STYLE_OUTLINE) ||
((o->cur.style & EVAS_TEXT_STYLE_MASK_BASIC) == EVAS_TEXT_STYLE_OUTLINE_SHADOW) ||
((o->cur.style & EVAS_TEXT_STYLE_MASK_BASIC) == EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW))
{
COLOR_SET(o, cur, outline);
DRAW_TEXT(-1, 0);