vg_common_svg: Keep backward compatibility about display, opacity of SVG 28/255028/5
authorJunsuChoi <jsuya.choi@samsung.com>
Thu, 11 Mar 2021 08:57:49 +0000 (17:57 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Fri, 12 Mar 2021 01:01:38 +0000 (10:01 +0900)
Edje compiled in version 4.0 of tizen studio does not have eet description in paser related to display and opacity.
Therefore, in later versions, display and opacity are always set to 0.
so, it blocks the display and opacity features.

When tizen studio's edje hosting service is in progress, this function can be added again.

@tizen_only

Change-Id: I1a34466522a691c8f88b76ec4f46a85193ee1314

src/static_libs/vg_common/vg_common_svg.c

index 3313432..8ca582a 100644 (file)
@@ -745,7 +745,13 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_
    // apply the transformation
    if (node->transform) efl_canvas_vg_node_transformation_set(vg, node->transform);
 
-   if (node->type != SVG_NODE_DOC && !node->display) evas_vg_node_visible_set(vg, EINA_FALSE);
+   //TIZEN_ONLY(210311): vg_common_svg: Keep backward compatibility about display, opacity of SVG
+   //Edje compiled in version 4.0 of tizen studio does not have eet description in paser related to display and opacity.
+   //Therefore, in later versions, display and opacity are always set to 0.
+   //so, it blocks the display and opacity features.
+   //When tizen studio's edje hosting service is in progress, this function can be added again.
+   //if (node->type != SVG_NODE_DOC && !node->display) evas_vg_node_visible_set(vg, EINA_FALSE);
+   //
 
    if (node->type == SVG_NODE_DOC) return;
 
@@ -774,14 +780,15 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_
                           ((float) style->fill.paint.b) * fa, style->fill.opacity);
      }
 
-   //apply node opacity
-   if (style->opacity < 255)
-     {
-        int r, g, b, a;
-        evas_vg_node_color_get(vg, &r, &g, &b, &a);
-        float fa = ((float) style->opacity / 255);
-        evas_vg_node_color_set(vg, ((float) r) * fa, ((float) g) * fa, ((float) b) * fa, ((float) a) * fa);
-     }
+   //TIZEN_ONLY(210311): vg_common_svg: Keep backward compatibility about display, opacity of SVG
+   //if (style->opacity < 255)
+   //  {
+   //     int r, g, b, a;
+   //     evas_vg_node_color_get(vg, &r, &g, &b, &a);
+   //     float fa = ((float) style->opacity / 255);
+   //     evas_vg_node_color_set(vg, ((float) r) * fa, ((float) g) * fa, ((float) b) * fa, ((float) a) * fa);
+   //  }
+   //
 
    if (node->type == SVG_NODE_G || node->type == SVG_NODE_CLIP_PATH)  return;
 
@@ -828,13 +835,14 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_
      }
 
    //apply node opacity to stroke color
-   if (style->opacity < 255)
-     {
-        int r, g, b, a;
-        evas_vg_shape_stroke_color_get(vg, &r, &g, &b, &a);
-        float fa = ((float) style->opacity / 255);
-        evas_vg_shape_stroke_color_set(vg, ((float) r) * fa, ((float) g) * fa, ((float) b) * fa, ((float) a) * fa);
-     }
+   //TIZEN_ONLY(210311): vg_common_svg: Keep backward compatibility about display, opacity of SVG
+   //if (style->opacity < 255)
+   //  {
+   //     int r, g, b, a;
+   //     evas_vg_shape_stroke_color_get(vg, &r, &g, &b, &a);
+   //     float fa = ((float) style->opacity / 255);
+   //     evas_vg_shape_stroke_color_set(vg, ((float) r) * fa, ((float) g) * fa, ((float) b) * fa, ((float) a) * fa);
+   //  }
 }
 
 static void