aboutsummaryrefslogtreecommitdiff
path: root/Perl/demos
diff options
context:
space:
mode:
authormertz2003-07-04 08:51:36 +0000
committermertz2003-07-04 08:51:36 +0000
commite6c3b92e487492b8265bc569cd83b8efd362da79 (patch)
treebf5ca61d1e446fb88f09edce7aab53325c1b3724 /Perl/demos
parentea5c7d10ffa2dfa2470f06eb1c82c7ef2ee7dc0a (diff)
downloadtkzinc-e6c3b92e487492b8265bc569cd83b8efd362da79.zip
tkzinc-e6c3b92e487492b8265bc569cd83b8efd362da79.tar.gz
tkzinc-e6c3b92e487492b8265bc569cd83b8efd362da79.tar.bz2
tkzinc-e6c3b92e487492b8265bc569cd83b8efd362da79.tar.xz
- using openGL if available. Otherwise, curves are just slightly
less nice - formating the printed coordinates as integers
Diffstat (limited to 'Perl/demos')
-rw-r--r--Perl/demos/Tk/demos/zinc_lib/curve_bezier.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/Perl/demos/Tk/demos/zinc_lib/curve_bezier.pl b/Perl/demos/Tk/demos/zinc_lib/curve_bezier.pl
index ffa426a..9cbbca2 100644
--- a/Perl/demos/Tk/demos/zinc_lib/curve_bezier.pl
+++ b/Perl/demos/Tk/demos/zinc_lib/curve_bezier.pl
@@ -26,6 +26,8 @@ my $zinc = $mw->Zinc(-width => 700, -height => 650,
-borderwidth => 0,
-backcolor => "white",
-forecolor => "grey80",
+ -render => 1, # this demo also works without openGL
+ # with openGL, antialiasing makes the curves nicer
)->pack;
my $group = $zinc->add('group', 1);
@@ -113,8 +115,8 @@ sub setText {
my $text = "[ ";
while (@coords) {
$refXYc = pop @coords;
- my $x=$refXYc->[0];
- my $y=$refXYc->[1];
+ my $x=sprintf "%i", $refXYc->[0];
+ my $y=sprintf "%i", $refXYc->[1];
my $t=$refXYc->[2];
$t = (defined $t) ? ", '".$t."'" : "" ;
$text .= "[$x, $y$t]";