aboutsummaryrefslogtreecommitdiff
path: root/Perl
diff options
context:
space:
mode:
Diffstat (limited to 'Perl')
-rw-r--r--Perl/demos/Tk/demos/zinc_lib/curve_bezier.pl10
1 files changed, 3 insertions, 7 deletions
diff --git a/Perl/demos/Tk/demos/zinc_lib/curve_bezier.pl b/Perl/demos/Tk/demos/zinc_lib/curve_bezier.pl
index 652f878..ffa426a 100644
--- a/Perl/demos/Tk/demos/zinc_lib/curve_bezier.pl
+++ b/Perl/demos/Tk/demos/zinc_lib/curve_bezier.pl
@@ -163,7 +163,7 @@ sub press {
$ptNum = $1;
}
}
- print "bezierNum=$bezierNum ptNum=$ptNum\n";
+# print "bezierNum=$bezierNum ptNum=$ptNum\n";
}
sub motion {
@@ -206,12 +206,8 @@ sub moveHandle {
$zinc->coords($lineB, 0,0, [ $x+$dx, $y+$dy ] );
}
- ## correctif d'erreur (zinc 3.2.6e)
- my @coords = $zinc->coords("bezier$bezierNum", 0);
- $num = $#coords +1 - $ptNum;
-
- my ($x,$y,$control) = $zinc->coords("bezier$bezierNum", 0,$num);
- $zinc->coords("bezier$bezierNum", 0,$num, [ [$x+$dx, $y+$dy, $control] ] );
+ my ($x,$y,$control) = $zinc->coords("bezier$bezierNum", 0,$ptNum-1);
+ $zinc->coords("bezier$bezierNum", 0,$ptNum-1, [ [$x+$dx, $y+$dy, $control] ] );
&setText ("bezier$bezierNum");
}