| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Ellipse; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Ellipse - A XFig file animator class - Ellipse object |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Ellipse object - object code in FIG format: 1. |
|
10
|
|
|
|
|
|
|
Here are all the attributes of this class: |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
B
|
|
13
|
|
|
|
|
|
|
area_fill, style_val, direction, angle, center_x, center_y, radius_x, radius_y, |
|
14
|
|
|
|
|
|
|
start_x, start_y, end_x, end_y> |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 FIG ATTRIBUTES |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=over |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=item sub_type |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1: ellipse defined by radii; |
|
23
|
|
|
|
|
|
|
2: ellipse defined by diameters; |
|
24
|
|
|
|
|
|
|
3: circle defined by radius; |
|
25
|
|
|
|
|
|
|
4: circle defined by diameter. |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=item line_style |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
-1: Default; |
|
30
|
|
|
|
|
|
|
0: Solid; |
|
31
|
|
|
|
|
|
|
1: Dashed; |
|
32
|
|
|
|
|
|
|
2: Dotted; |
|
33
|
|
|
|
|
|
|
3: Dash-dotted; |
|
34
|
|
|
|
|
|
|
4: Dash-double-dotted; |
|
35
|
|
|
|
|
|
|
5: Dash-triple-dotted. |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=item thickness |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
80-ths of an inch ("display units") |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=item pen_color |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
-1..31: FIG colors; |
|
44
|
|
|
|
|
|
|
32..543 (512 total): user colors. |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=item fill_color |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
-1..31: FIG colors; |
|
49
|
|
|
|
|
|
|
32..543 (512 total): user colors. |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=item depth |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
0 ... 999: larger value means object is deeper than (under) |
|
54
|
|
|
|
|
|
|
objects with smaller depth |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=item pen_style |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
unused |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=item area_fill |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
fill type |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=item style_val |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
length, in 1/80 inches, of the on/off |
|
67
|
|
|
|
|
|
|
dashes for dashed lines, and the distance between the dots, in 1/80 inches, |
|
68
|
|
|
|
|
|
|
for dotted lines |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=item direction |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
always 1 |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item angle |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
radians, the angle of the x-axis |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item center_x, center_y |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Fig units |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item radius_x, radius_y |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Fig units |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item start_x, start_y |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Fig units; the 1st point entered |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=item end_x, end_y |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Fig units; the last point entered |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=back |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 ADDITONNAL ATTRIBUTES |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=over |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item visibility |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
0: hidden; |
|
103
|
|
|
|
|
|
|
1: shown |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=back |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=cut |
|
108
|
|
|
|
|
|
|
|
|
109
|
1
|
|
|
1
|
|
6
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
43
|
|
|
110
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
30
|
|
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
# useful classes |
|
113
|
1
|
|
|
1
|
|
5
|
use FigAnim::Utils; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
1719
|
|
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
# constructor |
|
116
|
|
|
|
|
|
|
sub new { |
|
117
|
0
|
|
|
0
|
|
|
my $proto = shift; |
|
118
|
0
|
|
0
|
|
|
|
my $class = ref($proto) || $proto; |
|
119
|
0
|
|
|
|
|
|
my $self = {}; |
|
120
|
|
|
|
|
|
|
|
|
121
|
0
|
|
|
|
|
|
$self->{name} = shift; # object's name in comment |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
#$self->{object_code} = 1; |
|
124
|
0
|
|
|
|
|
|
$self->{sub_type} = shift; |
|
125
|
0
|
|
|
|
|
|
$self->{line_style} = shift; |
|
126
|
0
|
|
|
|
|
|
$self->{thickness} = shift; |
|
127
|
0
|
|
|
|
|
|
$self->{pen_color} = shift; |
|
128
|
0
|
|
|
|
|
|
$self->{fill_color} = shift; |
|
129
|
0
|
|
|
|
|
|
$self->{depth} = shift; |
|
130
|
0
|
|
|
|
|
|
$self->{pen_style} = shift; |
|
131
|
0
|
|
|
|
|
|
$self->{area_fill} = shift; |
|
132
|
0
|
|
|
|
|
|
$self->{style_val} = shift; |
|
133
|
0
|
|
|
|
|
|
$self->{direction} = shift; |
|
134
|
0
|
|
|
|
|
|
$self->{angle} = shift; |
|
135
|
0
|
|
|
|
|
|
$self->{center_x} = shift; |
|
136
|
0
|
|
|
|
|
|
$self->{center_y} = shift; |
|
137
|
0
|
|
|
|
|
|
$self->{radius_x} = shift; |
|
138
|
0
|
|
|
|
|
|
$self->{radius_y} = shift; |
|
139
|
0
|
|
|
|
|
|
$self->{start_x} = shift; |
|
140
|
0
|
|
|
|
|
|
$self->{start_y} = shift; |
|
141
|
0
|
|
|
|
|
|
$self->{end_x} = shift; |
|
142
|
0
|
|
|
|
|
|
$self->{end_y} = shift; |
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
# reference to the FigFile |
|
145
|
0
|
|
|
|
|
|
$self->{fig_file} = shift; |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
# object's visibility : 0=hidden 1=shown |
|
148
|
0
|
|
|
|
|
|
$self->{visibility} = 1; |
|
149
|
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
# animations |
|
151
|
0
|
|
|
|
|
|
$self->{animations} = []; |
|
152
|
|
|
|
|
|
|
|
|
153
|
0
|
|
|
|
|
|
bless ($self, $class); |
|
154
|
0
|
|
|
|
|
|
return $self; |
|
155
|
|
|
|
|
|
|
} |
|
156
|
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
# methods |
|
159
|
|
|
|
|
|
|
sub clone { |
|
160
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
161
|
0
|
|
|
|
|
|
my $obj = new Ellipse; |
|
162
|
0
|
|
|
|
|
|
$obj->{$_} = $self->{$_} foreach (keys %{$self}); |
|
|
0
|
|
|
|
|
|
|
|
163
|
0
|
|
|
|
|
|
return $obj; |
|
164
|
|
|
|
|
|
|
} |
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
sub output { |
|
167
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
168
|
0
|
0
|
|
|
|
|
return if ($self->{visibility} == 0); |
|
169
|
|
|
|
|
|
|
|
|
170
|
0
|
|
|
|
|
|
my $fh = shift; |
|
171
|
|
|
|
|
|
|
|
|
172
|
0
|
|
|
|
|
|
foreach (split(/\n/, $self->{name})) { |
|
173
|
0
|
|
|
|
|
|
printf $fh "# $_\n"; |
|
174
|
|
|
|
|
|
|
} |
|
175
|
|
|
|
|
|
|
|
|
176
|
0
|
|
|
|
|
|
printf $fh |
|
177
|
|
|
|
|
|
|
"1 %d %d %d %d %d %d %d %d %.3f %d %.4f %d %d %d %d %d %d %d %d\n", |
|
178
|
|
|
|
|
|
|
@$self{'sub_type','line_style','thickness','pen_color','fill_color', |
|
179
|
|
|
|
|
|
|
'depth','pen_style','area_fill','style_val','direction','angle', |
|
180
|
|
|
|
|
|
|
'center_x','center_y','radius_x','radius_y','start_x','start_y', |
|
181
|
|
|
|
|
|
|
'end_x','end_y'}; |
|
182
|
|
|
|
|
|
|
} |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
# animation methods |
|
186
|
|
|
|
|
|
|
sub setAttributeValue { |
|
187
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
188
|
0
|
|
|
|
|
|
my @anim = (0, $self->{name}, shift, 0, shift, shift); |
|
189
|
0
|
|
|
|
|
|
push @{$self->{fig_file}->{animations}}, \@anim; |
|
|
0
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
} |
|
191
|
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
sub setPenColor { |
|
193
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
194
|
0
|
|
|
|
|
|
my $time = shift; |
|
195
|
0
|
|
|
|
|
|
my $color = $FigAnim::Utils::colors_codes{shift}; |
|
196
|
0
|
0
|
|
|
|
|
if (defined $color) { |
|
197
|
0
|
|
|
|
|
|
my @anim = (0, $self->{name}, $time, 0, 'pen_color', $color); |
|
198
|
0
|
|
|
|
|
|
push @{$self->{fig_file}->{animations}}, \@anim; |
|
|
0
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
} |
|
200
|
|
|
|
|
|
|
} |
|
201
|
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
sub setFillColor { |
|
203
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
204
|
0
|
|
|
|
|
|
my $time = shift; |
|
205
|
0
|
|
|
|
|
|
my $color = $FigAnim::Utils::colors_codes{shift}; |
|
206
|
0
|
0
|
|
|
|
|
if (defined $color) { |
|
207
|
0
|
|
|
|
|
|
my @anim = (0, $self->{name}, $time, 0, 'fill_color', $color); |
|
208
|
0
|
|
|
|
|
|
push @{$self->{fig_file}->{animations}}, \@anim; |
|
|
0
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
} |
|
210
|
|
|
|
|
|
|
} |
|
211
|
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
sub hide { |
|
213
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
214
|
0
|
|
|
|
|
|
my @anim = (0, $self->{name}, shift, 0, 'visibility', 0); |
|
215
|
0
|
|
|
|
|
|
push @{$self->{fig_file}->{animations}}, \@anim; |
|
|
0
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
} |
|
217
|
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
sub show { |
|
219
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
220
|
0
|
|
|
|
|
|
my @anim = (0, $self->{name}, shift, 0, 'visibility', 1); |
|
221
|
0
|
|
|
|
|
|
push @{$self->{fig_file}->{animations}}, \@anim; |
|
|
0
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
} |
|
223
|
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
sub changeThickness { |
|
225
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
226
|
0
|
|
|
|
|
|
my @anim = (1, $self->{name}, shift, shift, int shift); |
|
227
|
0
|
|
|
|
|
|
push @{$self->{fig_file}->{animations}}, \@anim; |
|
|
0
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
} |
|
229
|
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
sub changeFillIntensity { |
|
231
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
232
|
0
|
|
|
|
|
|
my @anim = (2, $self->{name}, shift, shift, int shift); |
|
233
|
0
|
0
|
|
|
|
|
$anim[4] = 0 if ($anim[4] < 0); |
|
234
|
0
|
0
|
|
|
|
|
$anim[4] = 20 if ($anim[4] > 20); |
|
235
|
0
|
|
|
|
|
|
push @{$self->{fig_file}->{animations}}, \@anim; |
|
|
0
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
} |
|
237
|
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
sub translate { |
|
239
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
240
|
0
|
|
|
|
|
|
my @anim = (11, $self->{name}, shift, shift, shift, shift, shift); |
|
241
|
0
|
0
|
|
|
|
|
$anim[6] = '' if (!(defined $anim[6])); |
|
242
|
0
|
|
|
|
|
|
push @{$self->{fig_file}->{animations}}, \@anim; |
|
|
0
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
} |
|
244
|
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
sub rotate { |
|
246
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
247
|
0
|
|
|
|
|
|
my @anim = (21, $self->{name}, shift, shift, shift, shift, shift, shift); |
|
248
|
0
|
0
|
0
|
|
|
|
if (!((defined $anim[5]) && (defined $anim[6]))) { |
|
249
|
0
|
|
|
|
|
|
$anim[5] = $self->{center_x}; |
|
250
|
0
|
|
|
|
|
|
$anim[6] = $self->{center_y}; |
|
251
|
|
|
|
|
|
|
} |
|
252
|
0
|
0
|
|
|
|
|
$anim[7] = '' if (!(defined $anim[7])); |
|
253
|
0
|
|
|
|
|
|
push @{$self->{fig_file}->{animations}}, \@anim; |
|
|
0
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
} |
|
255
|
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
sub scale { |
|
257
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
258
|
0
|
|
|
|
|
|
my @anim = (31, $self->{name}, shift, shift, shift, shift, shift); |
|
259
|
0
|
0
|
0
|
|
|
|
if (!((defined $anim[5]) && (defined $anim[6]))) { |
|
260
|
0
|
|
|
|
|
|
$anim[5] = $self->{center_x}; |
|
261
|
0
|
|
|
|
|
|
$anim[6] = $self->{center_y}; |
|
262
|
|
|
|
|
|
|
} |
|
263
|
0
|
|
|
|
|
|
push @{$self->{fig_file}->{animations}}, \@anim; |
|
|
0
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
} |
|
265
|
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
# outputs a SVG element |
|
268
|
|
|
|
|
|
|
sub outputSVG { |
|
269
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
270
|
0
|
|
|
|
|
|
my $fh = shift; |
|
271
|
|
|
|
|
|
|
|
|
272
|
0
|
|
|
|
|
|
my ($colors) = @_; |
|
273
|
|
|
|
|
|
|
|
|
274
|
0
|
|
|
|
|
|
foreach (split(/\n/, $self->{name})) { |
|
275
|
0
|
|
|
|
|
|
print $fh "\n"; |
|
276
|
|
|
|
|
|
|
} |
|
277
|
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
# converts values in SVG-CSS |
|
279
|
|
|
|
|
|
|
|
|
280
|
0
|
|
|
|
|
|
my $style = "style=\""; |
|
281
|
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
# line_style, style_val, pen_color |
|
283
|
0
|
|
|
|
|
|
$style .= ConvertSVG::line_style_to_stroke($self->{line_style}, |
|
284
|
|
|
|
|
|
|
$self->{style_val}, |
|
285
|
|
|
|
|
|
|
$self->{pen_color}, |
|
286
|
|
|
|
|
|
|
$colors) . "; "; |
|
287
|
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
# thickness |
|
289
|
0
|
|
|
|
|
|
$style .= ConvertSVG::thickness_to_stroke($self->{thickness}) . "; "; |
|
290
|
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
# fill_color, area_fill |
|
292
|
0
|
|
|
|
|
|
$style .= ConvertSVG::area_fill_to_fill($self->{area_fill}, |
|
293
|
|
|
|
|
|
|
$self->{fill_color}, |
|
294
|
|
|
|
|
|
|
$colors); |
|
295
|
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
# end of style |
|
297
|
0
|
|
|
|
|
|
$style .= "\""; |
|
298
|
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
# direction |
|
300
|
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
# angle |
|
302
|
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
# center_x |
|
304
|
0
|
|
|
|
|
|
my $cx = "cx=\"" . $self->{center_x} . "\""; |
|
305
|
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
# center_y |
|
307
|
0
|
|
|
|
|
|
my $cy = "cy=\"" . $self->{center_y} . "\""; |
|
308
|
|
|
|
|
|
|
|
|
309
|
0
|
0
|
0
|
|
|
|
if (($self->{'sub_type'} == 1) || |
|
|
|
0
|
0
|
|
|
|
|
|
310
|
|
|
|
|
|
|
($self->{'sub_type'} == 2)) { # ellipse |
|
311
|
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
# radius_x |
|
313
|
0
|
|
|
|
|
|
my $rx = "rx=\"" . $self->{radius_x} . "\""; |
|
314
|
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
# radius_y |
|
316
|
0
|
|
|
|
|
|
my $ry = "ry=\"" . $self->{radius_y} . "\""; |
|
317
|
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
# angle |
|
319
|
0
|
|
|
|
|
|
my $angle = ConvertSVG::rad_to_deg($self->{angle}); |
|
320
|
0
|
|
|
|
|
|
my $transform = ""; |
|
321
|
0
|
0
|
|
|
|
|
if ($angle != 0) { |
|
322
|
0
|
|
|
|
|
|
$transform = |
|
323
|
|
|
|
|
|
|
"transform=\"rotate($angle, " . |
|
324
|
|
|
|
|
|
|
$self->{center_x} . ", " . |
|
325
|
|
|
|
|
|
|
$self->{center_y} . |
|
326
|
|
|
|
|
|
|
")\""; |
|
327
|
|
|
|
|
|
|
} |
|
328
|
|
|
|
|
|
|
|
|
329
|
0
|
|
|
|
|
|
print $fh "
|
|
330
|
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
} elsif (($self->{'sub_type'} == 3) || |
|
332
|
|
|
|
|
|
|
($self->{'sub_type'} == 4)) { # circle |
|
333
|
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
# radius |
|
335
|
0
|
|
|
|
|
|
my $r = "r=\"" . $self->{radius_x} . "\"";; |
|
336
|
|
|
|
|
|
|
|
|
337
|
0
|
|
|
|
|
|
print $fh "
|
|
338
|
|
|
|
|
|
|
} |
|
339
|
|
|
|
|
|
|
|
|
340
|
0
|
0
|
|
|
|
|
if ($#{$self->{animations}} >= 0) { # SVG + SMIL |
|
|
0
|
|
|
|
|
|
|
|
341
|
0
|
|
|
|
|
|
print $fh ">\n"; |
|
342
|
0
|
|
|
|
|
|
for (my $i = 0; $i <= $#{$self->{animations}}; $i++) { |
|
|
0
|
|
|
|
|
|
|
|
343
|
0
|
|
|
|
|
|
print $fh "\t"; |
|
344
|
0
|
|
|
|
|
|
my $smil = ConvertSMIL::smil($self->{animations}[$i]); |
|
345
|
0
|
|
|
|
|
|
print $fh $smil; |
|
346
|
0
|
|
|
|
|
|
print $fh "\n"; |
|
347
|
|
|
|
|
|
|
} |
|
348
|
|
|
|
|
|
|
|
|
349
|
0
|
0
|
0
|
|
|
|
if (($self->{'sub_type'} == 1) || |
|
|
|
0
|
0
|
|
|
|
|
|
350
|
|
|
|
|
|
|
($self->{'sub_type'} == 2)) { # ellipse |
|
351
|
0
|
|
|
|
|
|
print $fh "\n\n"; |
|
352
|
|
|
|
|
|
|
} elsif (($self->{'sub_type'} == 3) || |
|
353
|
|
|
|
|
|
|
($self->{'sub_type'} == 4)) { # circle |
|
354
|
0
|
|
|
|
|
|
print $fh "\n\n"; |
|
355
|
|
|
|
|
|
|
} |
|
356
|
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
} else { # SVG only |
|
358
|
0
|
|
|
|
|
|
print $fh " />\n\n"; |
|
359
|
|
|
|
|
|
|
} |
|
360
|
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
} |
|
362
|
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
1; |