evas: Fix text effect which has shadow direction
authorMinwoo, Lee <minwoo47.lee@samsung.com>
Mon, 23 Nov 2015 11:53:29 +0000 (20:53 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 23 Nov 2015 11:53:29 +0000 (20:53 +0900)
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

src/lib/evas/canvas/evas_object_text.c

index 08aa270..ff3e761 100644 (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);