diff options
Diffstat (limited to 'Perl/demos/Tk/demos/zinc_lib/color-path-and-conic.pl')
-rw-r--r-- | Perl/demos/Tk/demos/zinc_lib/color-path-and-conic.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Perl/demos/Tk/demos/zinc_lib/color-path-and-conic.pl b/Perl/demos/Tk/demos/zinc_lib/color-path-and-conic.pl index 2755358..2d21f93 100644 --- a/Perl/demos/Tk/demos/zinc_lib/color-path-and-conic.pl +++ b/Perl/demos/Tk/demos/zinc_lib/color-path-and-conic.pl @@ -13,7 +13,8 @@ my $zinc = $mw->Zinc(-width => 700, -height => 600, -render => 1, # for activating the openGL render )->pack; -die "no openGL rendering on this X server" unless $zinc->cget(-render); +# This demo no more dies if there is no openGL. It simply displays +# a string on the bootom of the window! $zinc->add('rectangle', 1, [10, 10, 80, 80], -fillcolor => "=path 0 0 |red |blue", -filled => 1); @@ -64,6 +65,11 @@ $zinc->add('arc', 1, [580, 410, 680, 580], -fillcolor => "=conical -40 -40 135 | #$zinc->add('arc', 1, [580, 410, 680, 580], -fillcolor => "=radial 40 40 |black;70|white;20", -filled => 1); +$zinc->add('text', 1, + -font => $defaultfont, + -text => "WITHOUT openGL, NO GRADIENT. SORRY!", + -anchor => 'nw', + -position => [20, 550]) unless $zinc->cget(-render); MainLoop; |