164
164
# Create the arrow and outline.
166
166
$c->delete('all');
167
$c->create('line', $v->{x1}, $v->{'y'}, $v->{x2}, $v->{'y'},
167
$c->createLine($v->{x1}, $v->{'y'}, $v->{x2}, $v->{'y'},
168
168
-width => 10*$v->{width},
169
169
-arrowshape => [10*$v->{a}, 10*$v->{b}, 10*$v->{c}],
170
170
-arrow => 'last', @{$v->{bigLineStyle}});
171
171
my $xtip = $v->{x2}-10*$v->{b};
172
172
my $deltaY = 10*$v->{c}+5*$v->{width};
173
$c->create('line', $v->{x2}, $v->{'y'}, $xtip, $v->{'y'}+$deltaY,
173
$c->createLine($v->{x2}, $v->{'y'}, $xtip, $v->{'y'}+$deltaY,
174
174
$v->{x2}-10*$v->{a}, $v->{'y'}, $xtip, $v->{'y'}-$deltaY,
175
175
$v->{x2}, $v->{'y'}, -width => 2, -capstyle => 'round',
176
176
-joinstyle => 'round');
178
178
# Create the boxes for reshaping the line and arrowhead.
180
$c->create('rectangle', $v->{x2}-10*$v->{a}-5, $v->{'y'}-5,
180
$c->createRectangle($v->{x2}-10*$v->{a}-5, $v->{'y'}-5,
181
181
$v->{x2}-10*$v->{a}+5, $v->{'y'}+5, @{$v->{boxStyle}},
182
182
-tags => ['box1', 'box']);
183
$c->create('rectangle', $xtip-5, $v->{'y'}-$deltaY-5, $xtip+5,
183
$c->createRectangle($xtip-5, $v->{'y'}-$deltaY-5, $xtip+5,
184
184
$v->{'y'}-$deltaY+5, @{$v->{boxStyle}},
185
185
-tags => ['box2', 'box']);
186
$c->create('rectangle', $v->{x1}-5, $v->{'y'}-5*$v->{width}-5,
186
$c->createRectangle($v->{x1}-5, $v->{'y'}-5*$v->{width}-5,
187
187
$v->{x1}+5, $v->{'y'}-5*$v->{width}+5, @{$v->{boxStyle}},
188
188
-tags => ['box3', 'box']);
190
190
# Create three arrows in actual size with the same parameters
192
$c->create('line', $v->{x2}+50, 0, $v->{x2}+50, 1000, -width => 2);
192
$c->createLine($v->{x2}+50, 0, $v->{x2}+50, 1000, -width => 2);
193
193
my $tmp = $v->{x2}+100;
194
$c->create('line', $tmp, $v->{'y'}-125, $tmp, $v->{'y'}-75,
194
$c->createLine($tmp, $v->{'y'}-125, $tmp, $v->{'y'}-75,
195
195
-width => $v->{width}, -arrow => 'both',
196
196
-arrowshape => [$v->{a}, $v->{b}, $v->{c}]);
197
$c->create('line', $tmp-25, $v->{'y'}, $tmp+25, $v->{'y'},
197
$c->createLine($tmp-25, $v->{'y'}, $tmp+25, $v->{'y'},
198
198
-width => $v->{width}, -arrow => 'both',
199
199
-arrowshape =>[$v->{a}, $v->{b}, $v->{c}]);
200
$c->create('line', $tmp-25, $v->{'y'}+75, $tmp+25, $v->{'y'}+125,
200
$c->createLine($tmp-25, $v->{'y'}+75, $tmp+25, $v->{'y'}+125,
201
201
-width => $v->{width}, -arrow => 'both',
202
202
-arrowshape => [$v->{a}, $v->{b}, $v->{c}]);
203
203
$c->itemconfigure($cur, @{$v->{activeStyle}}) if $cur =~ /box?/;
208
208
$tmp = $v->{x2}+10;
209
$c->create('line', $tmp, $v->{'y'}-5*$v->{width}, $tmp, $v->{'y'}-$deltaY,
209
$c->createLine($tmp, $v->{'y'}-5*$v->{width}, $tmp, $v->{'y'}-$deltaY,
210
210
-arrow => 'both', -arrowshape => $v->{smallTips});
211
$c->create('text', $v->{x2}+15, $v->{'y'}-$deltaY+5*$v->{c},
211
$c->createText($v->{x2}+15, $v->{'y'}-$deltaY+5*$v->{c},
212
212
-text => $v->{c}, -anchor => 'w');
213
213
$tmp = $v->{x1}-10;
214
$c->create('line', $tmp, $v->{'y'}-5*$v->{width}, $tmp,
214
$c->createLine($tmp, $v->{'y'}-5*$v->{width}, $tmp,
215
215
$v->{'y'}+5*$v->{width}, -arrow => 'both',
216
216
-arrowshape => $v->{smallTips});
217
$c->create('text', $v->{x1}-15, $v->{'y'}, -text => $v->{width},
217
$c->createText($v->{x1}-15, $v->{'y'}, -text => $v->{width},
219
219
$tmp = $v->{'y'}+5*$v->{width}+10*$v->{c}+10;
220
$c->create('line', $v->{x2}-10*$v->{a}, $tmp, $v->{x2}, $tmp,
220
$c->createLine($v->{x2}-10*$v->{a}, $tmp, $v->{x2}, $tmp,
221
221
-arrow => 'both', -arrowshape => $v->{smallTips});
222
$c->create('text', $v->{x2}-5*$v->{a}, $tmp+5, -text => $v->{a},
222
$c->createText($v->{x2}-5*$v->{a}, $tmp+5, -text => $v->{a},
225
$c->create('line', $v->{x2}-10*$v->{b}, $tmp, $v->{x2}, $tmp,
225
$c->createLine($v->{x2}-10*$v->{b}, $tmp, $v->{x2}, $tmp,
226
226
-arrow => 'both', -arrowshape => $v->{smallTips});
227
$c->create('text', $v->{x2}-5*$v->{b}, $tmp+5, -text => $v->{b},
227
$c->createText($v->{x2}-5*$v->{b}, $tmp+5, -text => $v->{b},
230
$c->create('text', $v->{x1}, 310, -text => "-width => $v->{width}",
230
$c->createText($v->{x1}, 310, -text => "-width => $v->{width}",
232
232
-font => '-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*');
233
$c->create('text', $v->{x1}, 330,
233
$c->createText($v->{x1}, 330,
234
234
-text => "-arrowshape => [$v->{a}, $v->{b}, $v->{c}]",
236
236
-font => '-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*');