aboutsummaryrefslogtreecommitdiff
path: root/Perl/demos/Tk
diff options
context:
space:
mode:
authormertz2004-09-21 12:43:03 +0000
committermertz2004-09-21 12:43:03 +0000
commita597ee865698eed2151f995ce7d9470b698f6b12 (patch)
treec7702c7701c8f8a06af3eea9a1d2ce5504fe8c85 /Perl/demos/Tk
parentc3f13cf54489f836d028258955c85479725f00c0 (diff)
downloadtkzinc-a597ee865698eed2151f995ce7d9470b698f6b12.zip
tkzinc-a597ee865698eed2151f995ce7d9470b698f6b12.tar.gz
tkzinc-a597ee865698eed2151f995ce7d9470b698f6b12.tar.bz2
tkzinc-a597ee865698eed2151f995ce7d9470b698f6b12.tar.xz
using classic colors #rrggbb rather than the X notation rgb:r/g/b when
the system is not linux
Diffstat (limited to 'Perl/demos/Tk')
-rw-r--r--Perl/demos/Tk/demos/zinc_lib/color-x.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/Perl/demos/Tk/demos/zinc_lib/color-x.pl b/Perl/demos/Tk/demos/zinc_lib/color-x.pl
index ca6dcb5..62937b2 100644
--- a/Perl/demos/Tk/demos/zinc_lib/color-x.pl
+++ b/Perl/demos/Tk/demos/zinc_lib/color-x.pl
@@ -58,6 +58,9 @@ $zinc->add('text', 1,
# we are using here the X explicit notation for rgb color
# we could also have used CIE encoding. If interested,
# please read the X man pages
+my $gradient = ($^O eq 'linux') ? "=axial 0 | rgb:ffff/0/0;40 | rgb:0/ffff/0;40 50 | rgb:0/0/ffff;40"
+ : "=axial 0 | #ff0000;40 | #00ff00;40 50 | #0000ff;40";
+
$zinc->add('rectangle', 1, [10, 210, 690, 300], -fillcolor => "=axial 0 | rgb:ffff/0/0;40 | rgb:0/ffff/0;40 50 | rgb:0/0/ffff;40", -filled => 1);
$zinc->add('text', 1,