From 91bf0e8766f87c25fdbb1a2b3ee8c3215e5dc369 Mon Sep 17 00:00:00 2001 From: mertz Date: Fri, 20 Dec 2002 12:30:12 +0000 Subject: correction des gradients circulaires --- Perl/demos/Tk/demos/zinc_lib/color-circular.pl | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'Perl/demos') diff --git a/Perl/demos/Tk/demos/zinc_lib/color-circular.pl b/Perl/demos/Tk/demos/zinc_lib/color-circular.pl index 38f25d2..0b19921 100644 --- a/Perl/demos/Tk/demos/zinc_lib/color-circular.pl +++ b/Perl/demos/Tk/demos/zinc_lib/color-circular.pl @@ -16,28 +16,28 @@ my $zinc = $mw->Zinc(-width => 700, -height => 600, die "no openGL rendering on this X server" unless $zinc->cget(-render); -$zinc->add('rectangle', 1, [0, 0, 100, 100], -fillcolor => "red|blue(50 50", -filled => 1); +$zinc->add('rectangle', 1, [10, 10, 80, 80], -fillcolor => "red|blue(50 50", -filled => 1); $zinc->add('text', 1, -font => $defaultfont, - -text => "Radial variation from non-transparent red to non-transparent blue\nin a squarre.\n", + -text => "Radial variation from non-transparent red to non-transparent blue\nin a squarre. The gradient starts from the lower right corner.\n", -anchor => 'nw', -position => [120, 20]); -$zinc->add('arc', 1, [0, 100, 100, 200], -fillcolor => "red:40|blue:40(50 150", -filled => 1); +$zinc->add('arc', 1, [10, 110, 90, 190], -fillcolor => "red:40|blue:40(0 25", -filled => 1); $zinc->add('text', 1, -font => $defaultfont, - -text => "Radial variation from 40%transparent red to 40% transparent blue\nin a disc.", + -text => "Radial variation from 40%transparent red to 40% transparent blue\nin a disc. The gradient starts in the middle between\nthe center on the bottom point", -anchor => 'nw', -position => [120, 120]); -$zinc->add('arc', 1, [0, 200, 100, 300], -fillcolor => "red:40|green:40 50|blue:40(50 250", -filled => 1); +$zinc->add('arc', 1, [10, 210, 90, 290], -fillcolor => "red:40|green:40 50|blue:40(0 0", -filled => 1); $zinc->add('text', 1, -font => $defaultfont, -text => "A variation from 40%transparent red to 40% transparent blue.\n". - "through a 40%green on the middle of the disc", + "through a 40%green on the middle of the disc. The gradient is centered.", -anchor => 'nw', -position => [120, 220]); @@ -49,17 +49,16 @@ $zinc->add('text', 1, $zinc->add('rectangle', 1, [10, 340, 690, 590], -fillcolor => "white", -filled => 1); -$zinc->add('rectangle', 1, [20, 365, 220, 565], -fillcolor => "red:40|green:40 50|blue:40(120 465", -filled => 1); +$zinc->add('rectangle', 1, [20, 365, 220, 565], -fillcolor => "red:40|green:40 50|blue:40(0 0", -filled => 1); -$zinc->add('arc', 1, [150, 365, 350, 565], -fillcolor => "yellow:40|black:40 50|cyan:40(250 465", -filled => 1); +$zinc->add('arc', 1, [150, 365, 350, 565], -fillcolor => "yellow:40|black:40 50|cyan:40(0 0", -filled => 1); -$zinc->add('arc', 1, [280, 365, 480, 565], -fillcolor => "black:100|black:100 20|white:40(380 465", -filled => 1, -linewidth => 0); +$zinc->add('arc', 1, [280, 365, 480, 565], -fillcolor => "black:100|black:100 20|white:40(0 0", -filled => 1, -linewidth => 0); -$zinc->add('arc', 1, [480, 365, 580, 500], -fillcolor => "black:100|white:40(520 465", -filled => 1); - -$zinc->add('arc', 1, [580, 410, 680, 580], -fillcolor => "black:50|white:40(600 450", -filled => 1); -$zinc->add('arc', 1, [580, 410, 680, 580], -fillcolor => "black:50|white:40(680 580", -filled => 1); +$zinc->add('arc', 1, [480, 365, 580, 500], -fillcolor => "black:100|white:40(-10 16", -filled => 1); +$zinc->add('arc', 1, [580, 410, 680, 580], -fillcolor => "black:70|white:20(-40 -40", -filled => 1); +$zinc->add('arc', 1, [580, 410, 680, 580], -fillcolor => "black:70|white:20(40 40", -filled => 1); -- cgit v1.1