summaryrefslogtreecommitdiff
path: root/src/static_libs
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-01-09 13:56:15 +0900
committerHermet Park <hermetpark@gmail.com>2019-01-09 14:59:01 +0900
commit07521f5e076f4489301190d1aa23711493871584 (patch)
treeff9d4e784bdedeb347076212b25ee1c138bc548e /src/static_libs
parent1ff024c9bbaeae5c66d4016b36fcb2b650d8ce0d (diff)
evas vg: refactor internal function name.
Specify explict svg name in vg common function since the function totally depends on svg spec. No logic changes.
Diffstat (limited to 'src/static_libs')
-rw-r--r--src/static_libs/vg_common/meson.build2
-rw-r--r--src/static_libs/vg_common/vg_common.h9
-rw-r--r--src/static_libs/vg_common/vg_common_svg.c (renamed from src/static_libs/vg_common/vg_common.c)24
3 files changed, 16 insertions, 19 deletions
diff --git a/src/static_libs/vg_common/meson.build b/src/static_libs/vg_common/meson.build
index eeb72fc..648fcd5 100644
--- a/src/static_libs/vg_common/meson.build
+++ b/src/static_libs/vg_common/meson.build
@@ -1,7 +1,7 @@
1#vg common is not really a static lib, is required by evas and requires evas ... so only collecting src here and compile them into evas ... ... 1#vg common is not really a static lib, is required by evas and requires evas ... so only collecting src here and compile them into evas ... ...
2 2
3vg_common_src = files([ 3vg_common_src = files([
4 'vg_common.c', 4 'vg_common_svg.c',
5 'vg_common.h', 5 'vg_common.h',
6]) 6])
7 7
diff --git a/src/static_libs/vg_common/vg_common.h b/src/static_libs/vg_common/vg_common.h
index 174cb20..ab0cb0d 100644
--- a/src/static_libs/vg_common/vg_common.h
+++ b/src/static_libs/vg_common/vg_common.h
@@ -8,6 +8,9 @@
8#include "evas_common_private.h" 8#include "evas_common_private.h"
9#include "evas_private.h" 9#include "evas_private.h"
10 10
11/******************************************************************************************
12 * SVG Compatible feature implementation
13 ******************************************************************************************/
11typedef enum _Svg_Node_Type Svg_Node_Type; 14typedef enum _Svg_Node_Type Svg_Node_Type;
12typedef enum _Svg_Length_Type Svg_Length_Type; 15typedef enum _Svg_Length_Type Svg_Length_Type;
13 16
@@ -25,13 +28,11 @@ typedef struct _Svg_Style_Property Svg_Style_Property;
25typedef struct _Svg_Line_Node Svg_Line_Node; 28typedef struct _Svg_Line_Node Svg_Line_Node;
26typedef struct _Svg_Custom_Command_Node Svg_Custom_Command_Node; 29typedef struct _Svg_Custom_Command_Node Svg_Custom_Command_Node;
27 30
28
29typedef struct _Svg_Style_Stroke Svg_Style_Stroke; 31typedef struct _Svg_Style_Stroke Svg_Style_Stroke;
30typedef struct _Svg_Style_Fill Svg_Style_Fill; 32typedef struct _Svg_Style_Fill Svg_Style_Fill;
31typedef enum _Svg_Fill_Flags Svg_Fill_Flags; 33typedef enum _Svg_Fill_Flags Svg_Fill_Flags;
32typedef enum _Svg_Stroke_Flags Svg_Stroke_Flags; 34typedef enum _Svg_Stroke_Flags Svg_Stroke_Flags;
33 35
34
35typedef enum _Svg_Gradient_Type Svg_Gradient_Type; 36typedef enum _Svg_Gradient_Type Svg_Gradient_Type;
36typedef struct _Svg_Style_Gradient Svg_Style_Gradient; 37typedef struct _Svg_Style_Gradient Svg_Style_Gradient;
37typedef struct _Svg_Linear_Gradient Svg_Linear_Gradient; 38typedef struct _Svg_Linear_Gradient Svg_Linear_Gradient;
@@ -312,8 +313,8 @@ enum _Svg_Style_Type
312 313
313Eet_Data_Descriptor * vg_common_svg_node_eet(void); 314Eet_Data_Descriptor * vg_common_svg_node_eet(void);
314void vg_common_svg_node_eet_destroy(void); 315void vg_common_svg_node_eet_destroy(void);
315Vg_File_Data * vg_common_create_vg_node(Svg_Node *node); 316Vg_File_Data * vg_common_svg_create_vg_node(Svg_Node *node);
316Svg_Node * vg_common_create_svg_node(Vg_File_Data *node); 317Svg_Node *vg_common_svg_create_svg_node(Vg_File_Data *node);
317void vg_common_svg_node_free(Svg_Node *node); 318void vg_common_svg_node_free(Svg_Node *node);
318 319
319#endif //EVAS_VG_COMMON_H_ 320#endif //EVAS_VG_COMMON_H_
diff --git a/src/static_libs/vg_common/vg_common.c b/src/static_libs/vg_common/vg_common_svg.c
index 1eb5b58..eba876e 100644
--- a/src/static_libs/vg_common/vg_common.c
+++ b/src/static_libs/vg_common/vg_common_svg.c
@@ -7,8 +7,6 @@
7#include <Eet.h> 7#include <Eet.h>
8#include <Evas.h> 8#include <Evas.h>
9 9
10
11
12Eet_Data_Descriptor *_eet_rect_node = NULL; 10Eet_Data_Descriptor *_eet_rect_node = NULL;
13Eet_Data_Descriptor *_eet_circle_node = NULL; 11Eet_Data_Descriptor *_eet_circle_node = NULL;
14Eet_Data_Descriptor *_eet_ellipse_node = NULL; 12Eet_Data_Descriptor *_eet_ellipse_node = NULL;
@@ -333,7 +331,7 @@ _eet_for_path_node(void)
333 return eet; 331 return eet;
334} 332}
335 333
336struct 334static struct
337{ 335{
338 Svg_Node_Type u; 336 Svg_Node_Type u;
339 const char *name; 337 const char *name;
@@ -354,8 +352,6 @@ struct
354}; 352};
355 353
356static const char * 354static const char *
357/* union
358 type_get() */
359_union_type_get(const void *data, 355_union_type_get(const void *data,
360 Eina_Bool *unknow) 356 Eina_Bool *unknow)
361{ 357{
@@ -372,7 +368,7 @@ _union_type_get(const void *data,
372 if (unknow) 368 if (unknow)
373 *unknow = EINA_TRUE; 369 *unknow = EINA_TRUE;
374 return NULL; 370 return NULL;
375} /* _union_type_get */ 371}
376 372
377static Eina_Bool 373static Eina_Bool
378_union_type_set(const char *type, 374_union_type_set(const char *type,
@@ -392,7 +388,7 @@ _union_type_set(const char *type,
392 return EINA_TRUE; 388 return EINA_TRUE;
393 } 389 }
394 return EINA_FALSE; 390 return EINA_FALSE;
395} /* _union_type_set */ 391}
396 392
397Eet_Data_Descriptor * 393Eet_Data_Descriptor *
398vg_common_svg_node_eet(void) 394vg_common_svg_node_eet(void)
@@ -450,7 +446,7 @@ vg_common_svg_node_eet(void)
450 return _eet_vg_node; 446 return _eet_vg_node;
451} 447}
452 448
453void 449void
454vg_common_svg_node_eet_destroy(void) 450vg_common_svg_node_eet_destroy(void)
455{ 451{
456 FREE_DESCRIPTOR(_eet_rect_node); 452 FREE_DESCRIPTOR(_eet_rect_node);
@@ -612,10 +608,10 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F
612 608
613 efl_gfx_path_bounds_get(grad_obj, &grad_geom); 609 efl_gfx_path_bounds_get(grad_obj, &grad_geom);
614 610
615 double cy = (grad_geom.h / 2.0) + grad_geom.y; 611 double cy = (grad_geom.h / 2) + grad_geom.y;
616 double cy_scaled = (grad_geom.h / 2.0) * scale_reversed_Y; 612 double cy_scaled = (grad_geom.h / 2) * scale_reversed_Y;
617 double cx = (grad_geom.w / 2.0) + grad_geom.x; 613 double cx = grad_geom.w / 2 + grad_geom.x;
618 double cx_scaled = (grad_geom.w / 2.0) * scale_reversed_X; 614 double cx_scaled = (grad_geom.w / 2) * scale_reversed_X;
619 615
620 /* matrix tranformation of gradient figure: 616 /* matrix tranformation of gradient figure:
621 * 0. we remember size of gradient and it's center point 617 * 0. we remember size of gradient and it's center point
@@ -820,7 +816,7 @@ vg_common_create_vg_node_helper(Svg_Node *node, Efl_VG *parent, Vg_File_Data *vg
820} 816}
821 817
822Vg_File_Data * 818Vg_File_Data *
823vg_common_create_vg_node(Svg_Node *node) 819vg_common_svg_create_vg_node(Svg_Node *node)
824{ 820{
825 Vg_File_Data *vg_data; 821 Vg_File_Data *vg_data;
826 822
@@ -1013,7 +1009,7 @@ vg_common_create_svg_node_helper(Efl_VG *vg, Svg_Node *parent)
1013} 1009}
1014 1010
1015Svg_Node * 1011Svg_Node *
1016vg_common_create_svg_node(Vg_File_Data *node) 1012vg_common_svg_create_svg_node(Vg_File_Data *node)
1017{ 1013{
1018 Svg_Node *doc; 1014 Svg_Node *doc;
1019 1015