summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorSubhransu Mohanty <sub.mohanty@samsung.com>2016-06-21 14:42:28 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-06-21 14:42:28 +0900
commita4e6d46d8a32ab97c495452205c2f28a823e23d8 (patch)
tree3ae4488b6c261b5fda133f0b273823e9a722818c /src/examples
parent7bf8da2baa243b972dd33d11ba873f6165e18fbf (diff)
edje/example: Added example for testing vector part with svg images.
Reviewers: cedric, jpeg Reviewed By: jpeg Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4062
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/edje/Makefile.am25
-rwxr-xr-xsrc/examples/edje/atom.svg14
-rwxr-xr-xsrc/examples/edje/bozo.svg15
-rwxr-xr-xsrc/examples/edje/bzrfeed.svg23
-rwxr-xr-xsrc/examples/edje/cartman.svg11
-rwxr-xr-xsrc/examples/edje/dst.svg15
-rwxr-xr-xsrc/examples/edje/duke.svg25
-rw-r--r--src/examples/edje/eee.svg4
-rw-r--r--src/examples/edje/fsm.svg20
-rw-r--r--src/examples/edje/google.svg4
-rw-r--r--src/examples/edje/hg0.svg10
-rw-r--r--src/examples/edje/ibm.svg44
-rw-r--r--src/examples/edje/osa.svg19
-rw-r--r--src/examples/edje/scion.svg9
-rw-r--r--src/examples/edje/svg-test.c111
-rw-r--r--src/examples/edje/svg.edc104
-rwxr-xr-xsrc/examples/edje/ubuntu.svg26
-rw-r--r--src/examples/edje/wikimedia.svg5
-rwxr-xr-xsrc/examples/edje/yinyang.svg6
19 files changed, 487 insertions, 3 deletions
diff --git a/src/examples/edje/Makefile.am b/src/examples/edje/Makefile.am
index 5d4f15d..f418cab 100644
--- a/src/examples/edje/Makefile.am
+++ b/src/examples/edje/Makefile.am
@@ -50,7 +50,8 @@ box_example.edc \
50embryo_tween_anim.edc \ 50embryo_tween_anim.edc \
51embryo_set_state_anim.edc \ 51embryo_set_state_anim.edc \
52bezier-transition-example.edc \ 52bezier-transition-example.edc \
53textblock-hyphen.edc 53textblock-hyphen.edc \
54svg.edc
54 55
55DIST_EDCS = $(EDCS) 56DIST_EDCS = $(EDCS)
56 57
@@ -85,6 +86,22 @@ red.png \
85test.png \ 86test.png \
86Vera.ttf \ 87Vera.ttf \
87duck.wav \ 88duck.wav \
89dst.svg \
90atom.svg \
91bojo.svg \
92bzrfeed.svg \
93yinyang.svg \
94ubuntu.svg \
95duke.svg \
96cartman.svg \
97ibm.svg \
98hg0.svg \
99fsm.svg \
100osa.svg \
101wikimedia.svg \
102scion.svg \
103eee.svg \
104google.svg \
88en_IN/domain_name.po \ 105en_IN/domain_name.po \
89hi_IN/domain_name.po \ 106hi_IN/domain_name.po \
90ta_IN/domain_name.mo \ 107ta_IN/domain_name.mo \
@@ -111,7 +128,8 @@ signals2.c \
111edje-swallow2.c \ 128edje-swallow2.c \
112edje-multisense.c \ 129edje-multisense.c \
113edje-edit-part-box.c \ 130edje-edit-part-box.c \
114edje-textblock-hyphenation.c 131edje-textblock-hyphenation.c \
132svg-test.c
115 133
116EXTRA_DIST = $(DIST_EDCS) $(DATA_FILES) 134EXTRA_DIST = $(DIST_EDCS) $(DATA_FILES)
117 135
@@ -181,7 +199,8 @@ edje-basic2 \
181signals2 \ 199signals2 \
182edje-swallow2 \ 200edje-swallow2 \
183edje-edit-part-box \ 201edje-edit-part-box \
184edje-textblock-hyphenation 202edje-textblock-hyphenation \
203svg-test
185 204
186if ENABLE_MULTISENSE 205if ENABLE_MULTISENSE
187EXTRA_PROGRAMS += edje-multisense 206EXTRA_PROGRAMS += edje-multisense
diff --git a/src/examples/edje/atom.svg b/src/examples/edje/atom.svg
new file mode 100755
index 0000000..4dff5e3
--- /dev/null
+++ b/src/examples/edje/atom.svg
@@ -0,0 +1,14 @@
1<svg xmlns="http://www.w3.org/2000/svg" viewBox="-52 -53 100 100" stroke-width="2">
2 <g fill="none">
3 <ellipse stroke="#66899a" rx="6" ry="44"/>
4 <ellipse stroke="#e1d85d" rx="6" ry="44" transform="rotate(-66)"/>
5 <ellipse stroke="#80a3cf" rx="6" ry="44" transform="rotate(66)"/>
6 <circle stroke="#4b541f" r="44"/>
7 </g>
8 <g fill="#66899a" stroke="white">
9 <circle fill="#80a3cf" r="13"/>
10 <circle cy="-44" r="9"/>
11 <circle cx="-40" cy="18" r="9"/>
12 <circle cx="40" cy="18" r="9"/>
13 </g>
14</svg>
diff --git a/src/examples/edje/bozo.svg b/src/examples/edje/bozo.svg
new file mode 100755
index 0000000..fe62615
--- /dev/null
+++ b/src/examples/edje/bozo.svg
@@ -0,0 +1,15 @@
1<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100">
2 <a xlink:href="http://www.tbray.org/ongoing/When/200x/2004/01/11/PostelPilgrim">
3 <path d="M10,15c10,10,10,0,40,0c30,0,30,10,40,0q-10,30-40,30q-30,0-40-30"
4 stroke="black" fill="red"/>
5 <ellipse stroke="black" fill="white" cx="50" cy="40" rx="22" ry="35"/>
6 <circle cx="50" cy="40" r="5" stroke="black" fill="red"/>
7 <circle cx="48" cy="38" r="1" fill="white"/>
8 <path d="M35,45C40,75,60,75,65,45Q50,60,35,45Z"
9 stroke="red" stroke-width="2" stroke-linejoin="round"/>
10 <circle cx="40" cy="30" r="2"/>
11 <circle cx="60" cy="30" r="2"/>
12 <path d="M35,30q5-10,10,0q-5-30-10,0" stroke="black" fill="none"/>
13 <path d="M55,30q5-10,10,0q-5-30-10,0" stroke="black" fill="none"/>
14 </a>
15</svg>
diff --git a/src/examples/edje/bzrfeed.svg b/src/examples/edje/bzrfeed.svg
new file mode 100755
index 0000000..e5d210f
--- /dev/null
+++ b/src/examples/edje/bzrfeed.svg
@@ -0,0 +1,23 @@
1<svg xmlns="http://www.w3.org/2000/svg" stroke-linejoin="round" viewBox="0 0 100 100">
2 <path d="M50,4L4,50L50,96L96,50Z" stroke="#FE4" stroke-width="3"/>
3 <path d="M50,5L5,50L50,95L95,50Z" stroke="#333" fill="#FE4" stroke-width="3"/>
4 <g transform="scale(0.8) translate(14,30)">
5 <path d="M37,42c-1,0,11-20,13-20c1,0,15,20,13,20h-9c0,8,9,22,12,25l-4,4l-8,-7v13h-10v-35z" stroke="#CA0" fill="#CA0"/>
6 <path d="M35,40c-1,0,11-20,13-20c1,0,15,20,13,20h-9c0,8,9,22,12,25l-4,4l-8,-7v13h-10v-35z" stroke="#333" fill="#555"/>
7 </g>
8 <g transform="translate(50,26) scale(0.25)" stroke-width="2">
9 <g fill="none">
10 <ellipse stroke="#469" rx="6" ry="44"/>
11 <ellipse stroke="#ba5" rx="6" ry="44" transform="rotate(-66)"/>
12 <ellipse stroke="#68c" rx="6" ry="44" transform="rotate(66)"/>
13 <circle stroke="#331" r="44"/>
14 </g>
15 <g fill="#689" stroke="#FE4">
16 <circle fill="#80a3cf" r="13"/>
17 <circle cy="-44" r="9"/>
18 <circle cx="-40" cy="18" r="9"/>
19 <circle cx="40" cy="18" r="9"/>
20 </g>
21 </g>
22</svg>
23
diff --git a/src/examples/edje/cartman.svg b/src/examples/edje/cartman.svg
new file mode 100755
index 0000000..d4b2740
--- /dev/null
+++ b/src/examples/edje/cartman.svg
@@ -0,0 +1,11 @@
1<svg viewBox='0 0 104 97' xmlns='http://www.w3.org/2000/svg'>
2 <path d='M14,85l3,9h72c0,0,5-9,4-10c-2-2-79,0-79,1' fill='#7C4E32'/>
3 <path d='M19,47c0,0-9,7-13,14c-5,6,3,7,3,7l1,14c0,0,10,8,23,8c14,0,26,1,28,0c2-1,9-2,9-4c1-1,27,1,27-9c0-10,7-20-11-29c-17-9-67-1-67-1' fill='#E30000'/>
4 <path d='M17,32c-3,48,80,43,71-3 l-35-15' fill='#FFE1C4'/>
5 <path d="M17,32c9-36,61-32,71-3c-20-9-40-9-71,3" fill="#8ED8F8"/>
6 <path d='M54,35a10 8 60 1 1 0,0.1zM37,38a10 8 -60 1 1 0,0.1z' fill='#FFF'/>
7 <path d='M41,6c1-1,4-3,8-3c3-0,9-1,14,3l-1,2h-2h-2c0,0-3,1-5,0c-2-1-1-1-1-1l-3,1l-2-1h-1c0,0-1,2-3,2c0,0-2-1-2-3M17,34l0-2c0,0,35-20,71-3v2c0,0-35-17-71,3M5,62c3-2,5-2,8,0c3,2,13,6,8,11c-2,2-6,0-8,0c-1,1-4,2-6,1c-4-3-6-8-2-12M99,59c0,0-9-2-11,4l-3,5c0,1-2,3,3,3c5,0,5,2,7,2c3,0,7-1,7-4c0-4-1-11-3-10' fill='#FFF200'/>
8 <path d='M56,78v1M55,69v1M55,87v1' stroke='#000' stroke-linecap='round'/>
9 <path d='M60,36a1 1 0 1 1 0-0.1M49,36a1 1 0 1 1 0-0.1M57,55a2 3 0 1 1 0-0.1M12,94c0,0,20-4,42,0c0,0,27-4,39,0z'/>
10 <path d='M50,59c0,0,4,3,10,0M56,66l2,12l-2,12M25,50c0,0,10,12,23,12c13,0,24,0,35-15' fill='none' stroke='#000' stroke-width='0.5'/>
11</svg>
diff --git a/src/examples/edje/dst.svg b/src/examples/edje/dst.svg
new file mode 100755
index 0000000..16d1baa
--- /dev/null
+++ b/src/examples/edje/dst.svg
@@ -0,0 +1,15 @@
1<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" >
2 <g transform="translate(25,25)">
3 <path d="M38,-1h12v2h-12zM-38-1h-12v2h12z"/>
4 <path d="M40,-1h8v2h-8zM-40-1h-8v2h8z" transform="rotate(30)"/>
5 <path d="M40,-1h8v2h-8zM-40-1h-8v2h8z" transform="rotate(60)"/>
6 <path d="M38,-1h12v2h-12zM-38-1h-12v2h12z" transform="rotate(90)"/>
7 <path d="M40,-1h8v2h-8zM-40-1h-8v2h8z" transform="rotate(120)"/>
8 <path d="M40,-1h8v2h-8zM-40-1h-8v2h8z" transform="rotate(150)"/>
9 <path d="M-0.5,0v-35h1v35z"/>
10 <path d="M0,-0.75h30v1.5h-30z"/>
11 <path d="M0,-0.75h30v1.5h-30z" transform="rotate(-30)" fill="#F88"/>
12 <path d="M25-12A28,28 0,0,1 28-2m-0.3,0l-1-2h2z" stroke-width="1" stroke-linejoin="round" stroke="#F00" fill="#F00"/>
13 <circle r="2"/>
14 </g>
15</svg>
diff --git a/src/examples/edje/duke.svg b/src/examples/edje/duke.svg
new file mode 100755
index 0000000..64cdcf8
--- /dev/null
+++ b/src/examples/edje/duke.svg
@@ -0,0 +1,25 @@
1<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 75 136">
2<path d="M1190 2982 c-38-31-31-179 17-347 14-49-50 34-89 115-59 126
3-75 138-139 104-89-45-31-286 106-438 37-41 37-56 2-56-64-1-147
4-63-147-111 0-68 36-95 107-78 72 17 110 12 162-18 59-36 99-53 121
5-53 70 0 98-274 36-339-77-80-124-64-211 69-235 363-871 1021-794
6823 6-16 15-109 21-208 8-154 7-237-7-510-1-22-5-71-9-110-3
7-38-8-99-11-135-16-193-59-311-172-463-89-120-103-199-62-333
846-147 32-217-65-342-86-110-34-240 74-182 15 8 16-2 16-118-1
9-208 99-262 252-137 459 378 583 383 820 37 106-155 165-182 267-123 179
10103 150 755-55 1272-72 180-71 272 6 419 l38 71-1 147 c0 177 4 192 76
11262 82 80 99 158 65 300-25 105-22 166 16 269 47 130 23 186-68 161-65
12-17-142-154-142-253 0-42-37 30-49 96-23 120-43 186-61 202-30 27
13-91 31-120 7z m-342-1094 c74-22 122-90 122-170 0-77-7-87-54-86-83
142-183-78-173-139 14-82-172-40-237 54-127 183 105 413 342 341z m315
15-214 c237-426 341-786 342-1179 0-460-61-531-239-277-251 358-453
16367-824 35-124-110-190-136-208-80-7 22-7 235 0 272 2 11 7 45 10 75
174 30 8 66 11 80 2 14 9 52 14 85 109 661 160 849 214 789 199-228 612 2 545
18303-6 28-4 32 15 36 38 7 40 4 120-139z m-900-522 c3-4-5-61-18-127
19-13-66-25-131-27-145-6-36-39 38-46 101-7 76 66 213 91 171z"
20transform="translate(0,136) scale(0.045181,-0.045181)"/>
21<ellipse rx="12" ry="10" transform="rotate(-24) translate(5.4,68.3)"
22fill="#F00" opacity="0.7"/>
23<ellipse rx="3.5" ry="2" transform="rotate(-33) translate(-9,61)" fill="#FFF"
24opacity="0.7"/>
25</svg>
diff --git a/src/examples/edje/eee.svg b/src/examples/edje/eee.svg
new file mode 100644
index 0000000..c23875e
--- /dev/null
+++ b/src/examples/edje/eee.svg
@@ -0,0 +1,4 @@
1<svg viewBox="0 0 121 83" xmlns="http://www.w3.org/2000/svg">
2<path d="M40,33c-12,2-28,9-36,20c-7,10-3,23,9,26c6,1,12,2,17,0v-1c-4,1-9,1-14,0c-11-2-19-13-11-23c6-9,15-13,24-17c5-2,13-2,16-6c-12-3-13-14-3-21c11-8,25-9,39-8v-1c-11-4-31,2-39,7c-4,2-8,6-9,10c-1,7,4,10,8,15M81,2v1c1,0,11,3,7,5c-2,2-8-1-11-1c-10-1-20,1-30,6c-3,1-8,4-8,8c1,11,21,9,28,9c2,0,9,1,6,4c-3,4-13,4-18,4c-12,2-26,6-37,13c-4,3-9,7-9,13c0,7,7,8,12,8c12,0,22-4,32-12c-1,0-1,7-3,9c-3,4-14,7-20,9v1c7-2,15-4,22-7c5,15,27,6,35-1c4,12,24,11,29,1c-9,4-25,9-23-7c8,0,17,0,24-5c8-6,3-14-6-15c-20-1-20,22-33,29c-9,4-21,3-21-9c8,0,18,0,24-5c8-6,4-14-5-15c-16-1-30,21-46,25c-6,1-16,3-20-4c-2-6,8-12,12-15c11-7,24-10,37-12c4-1,13,1,16-4c3-5-2-5-6-6c-6,0-26,1-27-7c-1-5,6-8,9-9c7-3,15-6,23-5c4,0,11,4,14,3c9-3-4-9-7-9" fill="#666"/>
3<path d="M59,63c6,0,13-1,18-6c2-2,4-5,3-8c-6-7-19,10-21,14M95,63c5,0,25-4,20-13c-1-3-5-2-7-1c-6,3-11,8-13,14" fill="#fff"/>
4</svg> \ No newline at end of file
diff --git a/src/examples/edje/fsm.svg b/src/examples/edje/fsm.svg
new file mode 100644
index 0000000..f059954
--- /dev/null
+++ b/src/examples/edje/fsm.svg
@@ -0,0 +1,20 @@
1<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 66">
2 <circle r="3" cx="63" cy="9"/>
3 <circle r="3" cx="87" cy="9"/>
4 <path d="M50,28s7-4,14-3l0,0s1,3,0,6l-2,0s-2-3-4-1l0,2s4,0,5,1l-1,5l-4-1l-1,5l-6-1z"/>
5 <path d="M65,38s0,4,2,8l6,0s15-5,3-14l0,0s-7-3,0-4l2,3s9,2,2-8l-6-1s-12,3-6,12l2,1s9,4-1,4z"/>
6 <path d="M84,45s-2-10,3-19l1-1s3,0,4,6l3-4l4,0s5,6,3,12l-4,1l-2-6s-3,8-7,0l-1,10z"/>
7 <g stroke="#000" stroke-width="3" fill="none" stroke-linecap="round">
8 <circle r="6" cx="63" cy="9"/>
9 <circle r="6" cx="87" cy="9"/>
10 <path d="M36,34S75,00,114,34m0,0S75,68,36,34"/>
11 <path d="M64,15l2,4M85,15l-1,4"/>
12
13 <path d="M36,34c-18-14-18-3-17-1s2,6-8,2c-6-4-6-2-9-2"/>
14 <path d="M42,39c-10,2-11,0-12,9c0,2,0,8-10,6c-4-2-8-2-9,2"/>
15 <path d="M50,45c-5,4-5,4-3,12c0,3,0,6-12,6"/>
16 <path d="M114,34c6-5,18-8,15,1c0,8,10,0,12,0s3-1,6,0"/>
17 <path d="M107,40c6,0,10,0,12,10c2,6,4,5,10,4s6-1,9,2"/>
18 <path d="M97,45s6,4,6,9s-5,10,11,10"/>
19 </g>
20</svg> \ No newline at end of file
diff --git a/src/examples/edje/google.svg b/src/examples/edje/google.svg
new file mode 100644
index 0000000..3e51a42
--- /dev/null
+++ b/src/examples/edje/google.svg
@@ -0,0 +1,4 @@
1<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
2<path d="M90,18c-90-45-115,102,0,69v-21l4-3h-23l-8,4h16v19c-80,15-65-106,2-63l-4,5l4-1z" fill="#CCC" stroke="#DDD" stroke-width="2" stroke-linejoin="round"/>
3<path d="M87,15c-90-45-115,102,0,69v-21l4-3h-23l-8,4h16v19c-80,15-65-106,2-63l-4,5l4-1z" fill="#00F"/>
4</svg> \ No newline at end of file
diff --git a/src/examples/edje/hg0.svg b/src/examples/edje/hg0.svg
new file mode 100644
index 0000000..2c51e0c
--- /dev/null
+++ b/src/examples/edje/hg0.svg
@@ -0,0 +1,10 @@
1<svg viewBox="0 0 103 98" xmlns="http://www.w3.org/2000/svg">
2 <path d="M89,71c15-26-3-68-38-64c-31,4-31,37-4,45c24,6,5,21,6,31c0,10,20,14,36-12M16,37c-5,0-8,5-8,9c1,5,5,9,10,8c5,0,8-4,8-9c-1-5-5-9-10-8" fill="#1b1a1b"/>
3 <circle cx="32" cy="73" fill="#1b1a1b" r="13"/>
4 <path d="M90,70c15-26-4-68-38-64c-31,4-32,37-4,44c23,7,5,22,5,32c1,10,21,14,37-12M17,36c-5,0-9,5-8,9c0,5,4,9,9,8c5,0,9-5,8-9c0-5-5-9-9-8" fill="#bfbfbf"/>
5 <circle cx="33" cy="72" fill="#bfbfbf" r="13"/>
6 <path d="M57,86c-1-1,1-3,2-3c3,0,8,0,12-2c10-6,25-33,17-51c-3-8-5-10-8-14c-1,0-1,0,0,0c2,1,5,5,9,11c6,11,5,24,3,32c-1,6-7,19-14,24c-8,6-17,9-21,3M50,50c-5-1-12-3-16-8c-3-4-4-8-5-11v-1c0-1,3,4,6,8c3,4,7,6,11,7c3,1,9,2,12,4c2,2,2,6,1,7c0,0-2-4-9-6M25,83c10,9,26-4,19-16l-1-1c2,7,0,12-4,15c-4,3-9,3-13,1c-1-1-2,0-1,1M13,51c0,1,1,2,2,2c1,0,4,1,8-1c4-3,4-9,2-11c0-1-1-2,0,0c1,4-2,7-4,9c-2,2-5,1-7,1c-1-1-1,0-1,0" fill="#000000"/>
7 <path d="M61,87c0,1,1,1,3,1c3,0,5-1,7-2c4-2,8-5,11-8c8-11,11-24,10-26c0,2-2,10-6,17c-6,9-10,14-20,17c-3,0-5-1-5,1M39,45l8,4c6,1,8,3,9,4c2,0,2,2,2,1c0-2,0-3-3-4c-1,0-4-2-6-2l-6-2l-4-1M33,85c1-1,9-3,11-9c1-2,1-2,0,0c0,5-6,9-10,9h-1M18,52c0,0,2,0,3-1c2-1,4-3,4-5v-1c0,5-4,7-6,8c-1,0-2,0-1-1" fill="#ffffff"/>
8 <path d="M87,53c7-19-7-48-35-44c-25,3-25,29-3,36c25,3,10,22,8,32c-2,9,20,10,30-24M24,80c2,0,3,0,4,1c4,2,9,1,12-3c3-3,3-8,2-11c-3-7-13-7-18-1c-5,7-1,14,0,14M10,47c1,1,1,2,3,2c2,1,3,2,5,1c3,0,5-3,6-5c1-3-1-5-3-7c-2-1-6-1-9,1c-2,2-3,5-2,8" fill="#999999"/>
9 <path d="M70,68c-7-1-16,14-7,12c9-1-9,2,0,0c4,0,8-2,11-6c5-4,11-15,13-22c1-6,1-15-1-6c-2,8-9,23-16,22M19,49c2-1,5-3,4-6c-2-2-7,0-7,3c0,3,1,3,3,3M35,81c1-1,7-3,6-11c-1-4-3,5-7,6c-6,2-5,6,1,5" fill="#f3f3f3"/>
10</svg> \ No newline at end of file
diff --git a/src/examples/edje/ibm.svg b/src/examples/edje/ibm.svg
new file mode 100644
index 0000000..c87ad11
--- /dev/null
+++ b/src/examples/edje/ibm.svg
@@ -0,0 +1,44 @@
1<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 148 68">
2<g transform="scale(0.1578)">
3<polyline fill="#5C7DB8" points="851.165,24.442 713.147,24.442 721.839,0.012 851.165,0.012 851.165,24.442 "/>
4<path fill="#5C7DB8" d="M473.454,0.012L601.34,0l8.59,24.487c0.056-0.034-136.431,0.034-136.431,0S473.421,0.012,473.454,0.012"/>
5<path fill="#5C7DB8" d="M368.987,0.012c21.684,2.088,40.531,9.811,56.585,24.476c0,0-238.443,0.022-238.443,0 c0-0.034,0-24.487,0-24.487L368.987,0.012"/>
6<rect x="0.024" y="0.006" fill="#5C7DB8" width="165.646" height="24.425"/>
7<path fill="#5C7DB8" d="M851.165,70.281H697.104c0,0,8.478-24.301,8.433-24.319h145.628V70.281"/>
8<polyline fill="#5C7DB8" points="626.222,70.304 473.454,70.304 473.454,45.962 617.563,45.962 626.222,70.304 "/>
9<path fill="#5C7DB8" d="M444.138,45.952c3.142,8.027,6.867,14.895,6.867,24.318H187.174V45.952H444.138"/>
10<rect x="0.024" y="45.962" fill="#5C7DB8" width="165.646" height="24.307"/>
11<path fill="#5C7DB8" d="M689.382,91.801l-8.546,24.42h123.438c0.057-0.056-0.033-24.38,0-24.38L689.382,91.801"/>
12<polyline fill="#5C7DB8" points="633.843,91.791 642.467,116.221 520.11,116.221 520.11,91.791 633.843,91.791 "/>
13<path fill="#5C7DB8" d="M453.099,91.791c0,8.381-1.047,17.096-3.489,24.431h-72.246V91.791H453.099"/>
14
15<rect x="46.196" y="91.908" fill="#5C7DB8" width="71.188" height="24.313"/>
16<rect x="235.101" y="91.791" fill="#5C7DB8" width="71.075" height="24.431"/>
17<path fill="#5C7DB8" d="M673.45,136.813h130.823v24.312h-69.668c0,0.197-0.034-18.526-0.034-18.526s-6.45,18.481-6.462,18.526 h-62.776L673.45,136.813"/>
18<path fill="#5C7DB8" d="M590.002,142.577c0,0,0.012,18.503,0,18.548H520.11v-24.312h129.573l8.703,24.312c0,0-61.889,0.046-61.889,0 L590.002,142.577"/>
19<path fill="#5C7DB8" d="M235.101,136.802h204.038c-4.459,8.14-12.564,18.042-20.242,24.324c0,0-183.795,0.023-183.795,0 C235.101,161.081,235.101,136.857,235.101,136.802"/>
20<rect x="46.196" y="136.802" fill="#5C7DB8" width="71.188" height="24.313"/>
21<rect x="734.605" y="182.641" fill="#5C7DB8" width="69.668" height="24.318"/>
22<path fill="#5C7DB8" d="M590.002,182.641H520.11v24.318c-0.056-0.022,69.903,0,69.903,0 C590.014,206.937,590.092,182.641,590.002,182.641"/>
23<path fill="#5C7DB8" d="M720.544,182.641c-0.326-0.023-8.162,24.296-8.5,24.318l-99.232,0.044 c-0.09-0.044-8.736-24.386-8.736-24.362H720.544"/>
24<path fill="#5C7DB8" d="M235.09,182.641h183.458c8.376,6.98,15.93,15.582,21.874,24.318c0.327-0.022-205.321,0-205.321,0 C235.101,206.937,235.09,182.674,235.09,182.641"/>
25<path fill="#5C7DB8" d="M117.383,206.959v-24.318H46.309c0,0,0.011,24.296,0,24.296C46.297,206.937,117.337,206.959,117.383,206.959 "/>
26<rect x="734.605" y="228.475" fill="#5C7DB8" width="69.668" height="24.318"/>
27<rect x="520.087" y="228.484" fill="#5C7DB8" width="69.915" height="24.309"/>
28<path fill="#5C7DB8" d="M695.754,252.905c0.012-0.102,8.59-24.454,8.724-24.431h-84.359c-0.158-0.012,8.646,24.329,8.646,24.329 S695.742,252.995,695.754,252.905"/>
29<path fill="#5C7DB8" d="M235.101,252.781c0,0.101-0.011-24.307-0.011-24.307h72.134c0,0,0.056,24.329,0,24.329 C307.156,252.804,235.101,252.77,235.101,252.781"/>
30<path fill="#5C7DB8" d="M450.544,228.475c3.479,7.329,3.838,16.042,4.526,24.431h-76.423v-24.431H450.544"/>
31<rect x="46.309" y="228.463" fill="#5C7DB8" width="71.075" height="24.318"/>
32
33<rect x="734.605" y="273.361" fill="#5C7DB8" width="116.548" height="24.318"/>
34<rect x="473.454" y="273.361" fill="#5C7DB8" width="116.548" height="24.318"/>
35<polyline fill="#5C7DB8" points="680.082,297.68 644.492,297.68 635.958,273.361 688.311,273.361 680.082,297.68 "/>
36<path fill="#5C7DB8" d="M0.013,273.361v24.318h165.522c0.079,0.045-0.068-24.296,0-24.296 C165.614,273.384-0.189,273.361,0.013,273.361"/>
37<path fill="#5C7DB8" d="M452.052,273.361c-1.745,8.038-3.344,17.812-9.197,24.318h-2.195H187.163v-24.318H452.052"/>
38<polyline fill="#5C7DB8" points="663.948,343.581 660.672,343.581 652.363,319.205 672.481,319.205 663.948,343.581 "/>
39<rect x="734.605" y="319.205" fill="#5C7DB8" width="116.548" height="24.432"/>
40<path fill="#5C7DB8" d="M187.129,343.581v-24.342c0,0,239.153,0.035,239.84,0.035c-16.055,15.355-38.088,24.014-61.809,24.362 l-177.997-0.046"/>
41<rect x="473.454" y="319.205" fill="#5C7DB8" width="116.548" height="24.432"/>
42<path fill="#5C7DB8" d="M165.536,319.318c0,0-0.068,24.263,0,24.263c0.079,0-165.478,0.1-165.522,0.044 c-0.045-0.044,0.045-24.386,0-24.386C-0.032,319.239,165.468,319.386,165.536,319.318"/>
43</g>
44</svg> \ No newline at end of file
diff --git a/src/examples/edje/osa.svg b/src/examples/edje/osa.svg
new file mode 100644
index 0000000..3c74d15
--- /dev/null
+++ b/src/examples/edje/osa.svg
@@ -0,0 +1,19 @@
1<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
2 <g stroke-width="5" fill="none">
3 <g stroke="#fa3">
4 <circle r="6" cx="24" cy="16"/>
5 <circle r="6" cx="51" cy="88"/>
6 <path d="M35,39a16,16 0,1,0 4-5l-11-13M50,62l1,20"/>
7 </g>
8 <g stroke="#a38">
9 <circle r="6" cx="72" cy="13"/>
10 <path d="M37,23a27,27 0,0,1 39,24M68,18l-5,7"/>
11 </g>
12 <g stroke="#e33">
13 <circle r="6" cx="49" cy="46"/>
14 <circle r="6" cx="11" cy="62"/>
15 <circle r="6" cx="89" cy="58"/>
16 <path d="M16,60l8-4M56,73a27,27 0,0,0 19-19l8,2M45,73a27,27 0,0,1-17-43"/>
17 </g>
18 </g>
19</svg> \ No newline at end of file
diff --git a/src/examples/edje/scion.svg b/src/examples/edje/scion.svg
new file mode 100644
index 0000000..24fa109
--- /dev/null
+++ b/src/examples/edje/scion.svg
@@ -0,0 +1,9 @@
1<svg viewBox="0 0 120 83" xmlns="http://www.w3.org/2000/svg">
2 <path d="M60,0c-33,0-60,19-60,42c0,22,27,41,60,41c33,0,60-19,60-41c0-23-27-42-60-42M60,77c-27,0-48-16-48-35c0-20,21-36,48-36c27,0,49,16,49,36c0,19-22,35-49,35" fill="#AAA"/>
3 <path d="M60,4c-28,0-52,17-52,38c0,20,24,37,52,37c29,0,52-17,52-37c0-21-23-38-52-38M60,77c-27,0-48-16-48-35c0-20,21-36,48-36c27,0,49,16,49,36c0,19-22,35-49,35" fill="#717279"/>
4 <path d="M60,3c-29,0-52,17-52,39c0,21,23,38,52,38c29,0,53-17,53-38c0-22-24-39-53-39M60,79c-28,0-52-17-52-37c0-21,24-38,52-38c29,0,52,17,52,38c0,20-23,37-52,37M111,35h-102l-1,7l1,6h102c1-2,1-4,1-6c0-3,0-5-1-7" fill="#EEE"/>
5 <path d="M108,34h-95l-4,1h3h96h3l-3-1" fill="#58585E"/>
6 <path d="M12,48h-3l4,1h95l3-1h-3z" fill="#3A3B3E"/>
7 <path d="M62,5c0,0-14,13-16,30h12c-4-13,4-30,4-30M59,78c0,0,13-13,15-30h-11c4,13-4,30-4,30" fill="#BBB"/>
8 <path d="M58,35h9c-11-6-5-30-5-30s-8,17-4,30M63,48h-10c11,6,6,30,6,30s8-17,4-30M109,45c0,1-1,1-2,1h-1v-7l-1-1h-15v8h-3v-9h19c1,0,3,1,3,2zM12,45h17c1,0,1-1,1-1v-2h-18v-3c0-1,1-2,3-2h18v1h-17c-1,0-1,1-1,1v2h18v3c0,1-1,2-3,2h-16c-1,0-2,0-2-1M38,44l1,1h17v1h-18c-2,0-3-1-3-2v-5c0-1,1-2,3-2h18v1h-17l-1,1zM62,37v9h-3v-9zM85,39v5c0,1-1,2-2,2h-16c-2,0-3-1-3-2v-5c0-1,1-2,3-2h16c1,0,2,1,2,2M81,38h-13c-1,0-1,1-1,1v5c0,0,0,1,1,1h13c1,0,1-1,1-1v-5c0,0,0-1-1-1" fill="#060506"/>
9</svg> \ No newline at end of file
diff --git a/src/examples/edje/svg-test.c b/src/examples/edje/svg-test.c
new file mode 100644
index 0000000..6716f6e
--- /dev/null
+++ b/src/examples/edje/svg-test.c
@@ -0,0 +1,111 @@
1/**
2 * Simple Edje example illustrating svg part usuage in edc.
3 *
4 * You'll need at least one Evas engine built for it (excluding the
5 * buffer one). See stdout/stderr for output.
6 *
7 * @verbatim
8 * edje_cc svg.edc && gcc -o svg-test svg-test.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
9 * @endverbatim
10 */
11
12#ifdef HAVE_CONFIG_H
13# include "config.h"
14#else
15# define EINA_UNUSED
16#endif
17
18#ifndef PACKAGE_DATA_DIR
19#define PACKAGE_DATA_DIR "."
20#endif
21
22#include <Ecore.h>
23#include <Ecore_Evas.h>
24#include <Edje.h>
25
26#define WIDTH 800
27#define HEIGHT 800
28
29static void
30_on_destroy(Ecore_Evas *ee EINA_UNUSED)
31{
32 ecore_main_loop_quit();
33}
34
35/* here just to keep our example's window size and background image's
36 * size in synchrony */
37static void
38_on_canvas_resize(Ecore_Evas *ee)
39{
40 Evas_Object *bg;
41 Evas_Object *edje_obj;
42 int w;
43 int h;
44
45 bg = ecore_evas_data_get(ee, "background");
46 edje_obj = ecore_evas_data_get(ee, "edje_obj");
47 ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
48 evas_object_resize(bg, w, h);
49 evas_object_resize(edje_obj, w, h);
50}
51
52int
53main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
54{
55 const char *edje_file = "./svg.edj";
56 Ecore_Evas *ee;
57 Evas *evas;
58 Evas_Object *bg;
59 Evas_Object *edje_obj;
60
61 if (!ecore_evas_init())
62 return EXIT_FAILURE;
63
64 if (!edje_init())
65 goto shutdown_ecore_evas;
66
67 /* this will give you a window with an Evas canvas under the first
68 * engine available */
69 ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
70 if (!ee) goto shutdown_edje;
71
72 ecore_evas_callback_destroy_set(ee, _on_destroy);
73 ecore_evas_callback_resize_set(ee, _on_canvas_resize);
74 ecore_evas_title_set(ee, "SVG Example");
75
76 evas = ecore_evas_get(ee);
77
78 bg = evas_object_rectangle_add(evas);
79 evas_object_color_set(bg, 0, 0, 0, 255);
80 evas_object_resize(bg, WIDTH, HEIGHT);
81 evas_object_focus_set(bg, EINA_TRUE);
82 evas_object_show(bg);
83 ecore_evas_data_set(ee, "background", bg);
84
85
86 edje_obj = edje_object_add(evas);
87
88 edje_object_file_set(edje_obj, edje_file, "svg-test");
89 evas_object_move(edje_obj, 0, 0);
90 evas_object_resize(edje_obj, WIDTH, HEIGHT);
91 evas_object_show(edje_obj);
92 ecore_evas_data_set(ee, "edje_obj", edje_obj);
93
94
95 ecore_evas_show(ee);
96
97 ecore_main_loop_begin();
98
99 ecore_evas_free(ee);
100 ecore_evas_shutdown();
101 edje_shutdown();
102
103 return EXIT_SUCCESS;
104
105 shutdown_edje:
106 edje_shutdown();
107 shutdown_ecore_evas:
108 ecore_evas_shutdown();
109
110 return EXIT_FAILURE;
111}
diff --git a/src/examples/edje/svg.edc b/src/examples/edje/svg.edc
new file mode 100644
index 0000000..d458f45
--- /dev/null
+++ b/src/examples/edje/svg.edc
@@ -0,0 +1,104 @@
1#define SVG_PART(bg, vg, rel1x, rel1y, rel2x, rel2y,svg_id)\
2 rect { bg; \
3 description { state: "default" 0.0; \
4 color: 255 255 255 255; \
5 rel1.relative: rel1x rel1y; \
6 rel2.relative: rel2x rel2y; \
7 rel1.offset: 1 1; \
8 rel2.offset: -1 -1; \
9 } \
10 description { state: "clicked" 0.0; \
11 inherit: "default" 0.0; \
12 rel1.relative: 0.0 0.0; \
13 rel2.relative: 1.0 1.0; \
14 } \
15 }\
16 vector { vg;\
17 description { state: "default" 0.0; \
18 color: 255 255 255 255; \
19 rel1.to: bg; \
20 rel2.to: bg; \
21 image.normal: svg_id; \
22 } \
23 description { state: "clicked" 0.0; \
24 inherit: "default" 0.0; \
25 } \
26 }
27
28 #define SVG_PROGRAM(bg, vg) \
29 program { bg; \
30 signal: "mouse,down,1"; \
31 source: vg; \
32 action: STATE_SET "clicked"; \
33 transition: LINEAR 0.5; \
34 target: bg; \
35 }\
36 program { vg; \
37 signal: "mouse,up,1"; \
38 source: vg; \
39 action: STATE_SET "default"; \
40 transition: LINEAR 0.5; \
41 target: bg; \
42 }
43
44collections {
45 base_scale: 1.0;
46 /* TODO: Please replace embedded image files to your application image files. */
47 images {
48 vector: "dst.svg";
49 vector: "atom.svg";
50 vector: "bojo.svg";
51 vector: "bzrfeed.svg";
52 vector: "yinyang.svg";
53 vector: "ubuntu.svg";
54 vector: "duke.svg";
55 vector: "cartman.svg";
56 vector: "ibm.svg";
57 vector: "hg0.svg";
58 vector: "fsm.svg";
59 vector: "osa.svg";
60 vector: "wikimedia.svg";
61 vector: "scion.svg";
62 vector: "eee.svg";
63 vector: "google.svg";
64
65 }
66 group {
67 name: "svg-test";
68 parts {
69 SVG_PART("bg1", "vg1", 0.0, 0.0, .25, .25,"dst.svg")
70 SVG_PART("bg2", "vg2", 0.25, 0.0, .5, .25,"atom.svg")
71 SVG_PART("bg3", "vg3", 0.5, 0.0, .75, .25,"bojo.svg")
72 SVG_PART("bg4", "vg4", 0.75, 0.0, 1.0, .25,"bzrfreed.svg")
73 SVG_PART("bg5", "vg5", 0.0, 0.25, .25, .5,"yinyang.svg")
74 SVG_PART("bg6", "vg6", 0.25, 0.25, .5, .5,"ubuntu.svg")
75 SVG_PART("bg7", "vg7", 0.5, 0.25, .75, .5,"duke.svg")
76 SVG_PART("bg8", "vg8", 0.75, 0.25, 1.0, .5,"cartman.svg")
77 SVG_PART("bg9", "vg9", 0.0, 0.5, .25, .75,"ibm.svg")
78 SVG_PART("bg10", "vg10", 0.25, 0.5, .5, .75,"hg0.svg")
79 SVG_PART("bg11", "vg11", 0.5, 0.5, .75, .75,"fsm.svg")
80 SVG_PART("bg12", "vg12", 0.75, 0.5, 1.0, .75,"osa.svg")
81 SVG_PART("bg13", "vg13", 0.0, 0.75, .25, 1.0,"wikimedia.svg")
82 SVG_PART("bg14", "vg14", 0.25, 0.75, .5, 1.0,"scion.svg")
83 SVG_PART("bg15", "vg15", 0.5, 0.75, .75, 1.0,"eee.svg")
84 SVG_PART("bg16", "vg16", 0.75, 0.75, 1.0, 1.0,"google.svg")
85 }
86 programs {
87 SVG_PROGRAM("bg1", "vg1")
88 SVG_PROGRAM("bg2", "vg2")
89 SVG_PROGRAM("bg3", "vg3")
90 SVG_PROGRAM("bg4", "vg4")
91 SVG_PROGRAM("bg5", "vg5")
92 SVG_PROGRAM("bg6", "vg6")
93 SVG_PROGRAM("bg7", "vg7")
94 SVG_PROGRAM("bg8", "vg8")
95 SVG_PROGRAM("bg9", "vg9")
96 SVG_PROGRAM("bg10", "vg10")
97 SVG_PROGRAM("bg11", "vg11")
98 SVG_PROGRAM("bg12", "vg12")
99 SVG_PROGRAM("bg13", "vg13")
100 SVG_PROGRAM("bg14", "vg14")
101 SVG_PROGRAM("bg15", "vg15")
102 SVG_PROGRAM("bg16", "vg16")
103 }
104 } \ No newline at end of file
diff --git a/src/examples/edje/ubuntu.svg b/src/examples/edje/ubuntu.svg
new file mode 100755
index 0000000..4d7b3ee
--- /dev/null
+++ b/src/examples/edje/ubuntu.svg
@@ -0,0 +1,26 @@
1<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-70 -70 140 140">
2
3 <defs>
4 <path id="b" d="M 23,-20 A32,32 0,0,0 -23,-20 L -40,-30 A42,42 0,0,1 -14,-47 A17,17 0,0,0 14,-47 A42,42 0,0,1 40,-30 Z"/>
5 <circle id="h" cx="0" cy="-57" r="12"/>
6 </defs>
7
8 <g transform="translate(5,5)" opacity="0.125">
9 <use xlink:href="#h" transform="rotate(30)"/>
10 <use xlink:href="#b" transform="rotate(30)"/>
11 <use xlink:href="#h" transform="rotate(150)"/>
12 <use xlink:href="#b" transform="rotate(150)"/>
13 <use xlink:href="#h" transform="rotate(-90)"/>
14 <use xlink:href="#b" transform="rotate(-90)"/>
15 </g>
16
17 <a xlink:href="http://www.ubuntu.com/">
18 <use xlink:href="#h" fill="#d00" transform="rotate(30)"/>
19 <use xlink:href="#b" fill="#f40" transform="rotate(30)"/>
20 <use xlink:href="#h" fill="#f80" transform="rotate(150)"/>
21 <use xlink:href="#b" fill="#d00" transform="rotate(150)"/>
22 <use xlink:href="#h" fill="#f40" transform="rotate(-90)"/>
23 <use xlink:href="#b" fill="#f80" transform="rotate(-90)"/>
24 </a>
25
26</svg>
diff --git a/src/examples/edje/wikimedia.svg b/src/examples/edje/wikimedia.svg
new file mode 100644
index 0000000..ad2c211
--- /dev/null
+++ b/src/examples/edje/wikimedia.svg
@@ -0,0 +1,5 @@
1<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
2 <path d="M19,16a46,46 0,1,0 62,0l-8,8a34,34 0,1,1-46,0z" fill="#069"/>
3 <path d="M46,43v35a28,28 0,0,1-14-49zM54,43v35a28,28 0,0,0 14-49z" fill="#396"/>
4 <circle r="15" cx="50" cy="18" fill="#900"/>
5</svg> \ No newline at end of file
diff --git a/src/examples/edje/yinyang.svg b/src/examples/edje/yinyang.svg
new file mode 100755
index 0000000..3c64a6c
--- /dev/null
+++ b/src/examples/edje/yinyang.svg
@@ -0,0 +1,6 @@
1<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
2 <circle cx="50" cy="50" r="48" fill="none" stroke="#000"/>
3 <path d="M50,2a48,48 0 1 1 0,96a24 24 0 1 1 0-48a24 24 0 1 0 0-48"/>
4 <circle cx="50" cy="26" r="6"/>
5 <circle cx="50" cy="74" r="6" fill="#FFF"/>
6</svg>