aboutsummaryrefslogtreecommitdiff
path: root/sandbox
diff options
context:
space:
mode:
authormertz2002-04-24 08:28:15 +0000
committermertz2002-04-24 08:28:15 +0000
commit6018b037e417147b0af2ba80d5bab5d838c13f00 (patch)
tree3f2468a931c3e0bfacfbf530b67d3479f72eda15 /sandbox
parentd3d2eaa8f185d0a0574b51ea70820ee2d3925e80 (diff)
downloadtkzinc-6018b037e417147b0af2ba80d5bab5d838c13f00.zip
tkzinc-6018b037e417147b0af2ba80d5bab5d838c13f00.tar.gz
tkzinc-6018b037e417147b0af2ba80d5bab5d838c13f00.tar.bz2
tkzinc-6018b037e417147b0af2ba80d5bab5d838c13f00.tar.xz
utilisation d'uin background rouge (red) pour
pouvoir utiliser facilement convert (de imagemagick) afin de remplacer la couleur rouge (red) par la couleur transparente! ex: convert -transparent red non-transparent.png transparent.png
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/allgradients.pl8
-rw-r--r--sandbox/allreliefs.pl8
2 files changed, 12 insertions, 4 deletions
diff --git a/sandbox/allgradients.pl b/sandbox/allgradients.pl
index b4512c0..98b2c9c 100644
--- a/sandbox/allgradients.pl
+++ b/sandbox/allgradients.pl
@@ -11,6 +11,7 @@ my $defaultfont = '-b&h-lucida-bold-r-normal-*-*-140-*-*-p-*-iso10646-1';
my $mw = MainWindow->new();
my $zinc = $mw->Zinc(-width => 700, -height => 300,
-render => 1,
+ -backcolor => "red", # this will be transparent in the doc
)->pack();
@@ -26,7 +27,12 @@ $zinc->gname('white|white 30|black:80[25 15', 'path 2');
$grp = $zinc->add('group', 1);
$zinc->add('rectangle', $grp, [0, 0, 70, 50],
-filled => 1,
- -linewidth => 0,
+ -fillcolor => 'white',
+ );
+$zinc->add('rectangle', $grp, [0, 0, 70, 50],
+ -filled => 1,
+ -linewidth => 1, # to help making the background transparent with gimp!
+
-fillcolor => 'axial 1',
-tags => ['attrs']);
$zinc->add('text', $grp,
diff --git a/sandbox/allreliefs.pl b/sandbox/allreliefs.pl
index 939e5ba..2a19151 100644
--- a/sandbox/allreliefs.pl
+++ b/sandbox/allreliefs.pl
@@ -7,10 +7,11 @@ use Tk::Zinc;
use strict;
my ($grp,, $s, $i);
-my $defaultfont = '-b&h-lucida-bold-r-normal-*-*-140-*-*-p-*-iso10646-1';
+my $defaultfont = '-adobe-helvetica-bold-r-normal-*-100-*-*-*-*-*-*';
my $mw = MainWindow->new();
my $zinc = $mw->Zinc(-width => 700, -height => 300,
-render => 1,
+ -backcolor => "red", # this will be transparent in the doc
)->pack();
@@ -25,6 +26,7 @@ $zinc->add('rectangle', $grp, [0, 0, 70, 50],
$zinc->add('text', $grp,
-text => 'raised',
-anchor => 'center',
+ -font => $defaultfont,
-position => [35, -10],
-tags => ['attrs']);
$zinc->translate($grp, 20, 30);
@@ -39,11 +41,11 @@ foreach $s (('sunken', 'ridge', 'groove',
-relief => $s);
$i++;
if ($i == 5) {
- $zinc->translate($grp, -3*90, 80);
+ $zinc->translate($grp, -3*100, 80);
$i = 1;
}
else {
- $zinc->translate($grp, 90, 0);
+ $zinc->translate($grp, 100, 0);
}
}