aboutsummaryrefslogtreecommitdiff
path: root/src/SVG/SVG2zinc.pm
diff options
context:
space:
mode:
authorribet2007-10-08 10:04:26 +0000
committerribet2007-10-08 10:04:26 +0000
commit38391b08159b9158ef3c81fa187bec5a9d8f2903 (patch)
tree3764cf81fd344de0421500b8b872132cc7e1ea35 /src/SVG/SVG2zinc.pm
parentdc3bd25e0d8437a81a0c5036a44f8e1571e1cddf (diff)
downloadmtc-38391b08159b9158ef3c81fa187bec5a9d8f2903.zip
mtc-38391b08159b9158ef3c81fa187bec5a9d8f2903.tar.gz
mtc-38391b08159b9158ef3c81fa187bec5a9d8f2903.tar.bz2
mtc-38391b08159b9158ef3c81fa187bec5a9d8f2903.tar.xz
Fixing images with transparency, no more intermediate group created. The image was wrongly associated with it's group.
Diffstat (limited to 'src/SVG/SVG2zinc.pm')
-rw-r--r--src/SVG/SVG2zinc.pm7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/SVG/SVG2zinc.pm b/src/SVG/SVG2zinc.pm
index 22d41bb..54c369c 100644
--- a/src/SVG/SVG2zinc.pm
+++ b/src/SVG/SVG2zinc.pm
@@ -968,16 +968,11 @@ sub image {
my @RES;
if (my $opacity = $attrs{'opacity'})
{
- # creating an intermediate group for managing the transparency
- # BUG: we could used the attribute -color := white:$opacity
$opacity = &convertOpacity ($opacity);
if ($opacity != 1)
{
- ## on cr?e un groupe pour g?rer la transparence
my $opacity = &float2int(100 * $opacity);
- my $newgroup = substr ($name, 0, -1) . "transparency'";
- push @RES , '$previous = '." -> add('group', $current_group, -alpha => $opacity, -tags => [ $newgroup ], -priority => 10);\n";
- $group = $newgroup;
+ $group .= ", -color => 'white;$opacity'";
}
}
my $res = "";