Code

remove svg_dropshadow
authorbuliabyak <buliabyak@users.sourceforge.net>
Sun, 1 Apr 2007 18:07:46 +0000 (18:07 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Sun, 1 Apr 2007 18:07:46 +0000 (18:07 +0000)
share/extensions/Makefile.am
share/extensions/svg_dropshadow [deleted file]
share/extensions/svg_dropshadow.inx [deleted file]

index 256133d035aa82bfa82af644bbcf87aed0d5e258..f0c75fa9c54c0b12c5b0f2146f220ebd909a7c51 100644 (file)
@@ -77,7 +77,6 @@ extensions = \
        straightseg.py \
        summersnight.py \
        svg_and_media_zip_output.py \
-       svg_dropshadow \
        txt2svg.pl \
        webbrowser_commandline.py \
        webbrowser_faq.py\
@@ -155,7 +154,6 @@ modules = \
        straightseg.inx \
        summersnight.inx \
        svg_and_media_zip_output.inx \
-       svg_dropshadow.inx \
        svgz_input.inx \
        svgz_output.inx \
        txt2svg.inx \
diff --git a/share/extensions/svg_dropshadow b/share/extensions/svg_dropshadow
deleted file mode 100644 (file)
index 0412d48..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/perl -w
-#
-# svg_dropshadow
-#
-# Creates drop shadows for all svg elements specified by --id, or
-# whole file if no ids are given.
-#
-# Authors: Daniel Goude (goude@dtek.chalmers.se)
-#
-
-use strict;
-use warnings;
-
-use File::Basename();
-use lib File::Basename::dirname($0);
-
-use SpSVG;
-
-my $sp = new SpSVG;
-
-# Set the script name, used when displaying --help
-$sp->set_name($0);
-
-# Set usage string (options are handled separately).
-my $usage = <<EOF;
-Creates drop shadows from svg group(s)
-EOF
-$sp->set_usage($usage);
-
-# Set script specific options and description (used for --help)
-# SpSVG will hasdle in/out files, and help
-my @opt_vals = ( 
-    {
-        "opt" => "color=s",
-        "desc" => "Shadow color (default black)",
-    }, 
-    
-
-    {
-        "opt" => "opacity=s",
-        "desc" => "Shadow offset (0-1, default 0.5)",
-    }, 
-    
-    {
-        "opt" => "offset=s",
-        "desc" => "Shadow offset, default 10",
-    },
-);
-
-my %opts = $sp->get_opts(@opt_vals);
-
-my $color = $opts{'color'} || 'black';
-my $opacity = $opts{'opacity'} || '0.5';
-my $offset= $opts{'offset'} || '10';
-
-# Read input file (from --file or STDIN)
-$sp->parse;
-
-# Apply make_shadow to selected ids, or whole file
-$sp->process_ids(\&make_shadow);
-
-# Dump the file (to --output or STDOUT)
-$sp->dump;
-
-# That's it!
-
-# make_shadow takes an svg fragment and returns named fragment 
-# with a shadow added
-sub make_shadow {
-    my $element = shift;
-
-    # Duplicate element
-    my $shadow = $element;
-
-    # Set shadow color
-    $shadow =~ s/(stroke|fill):[^;]+;/$1:$color;/ig;
-
-    my $svg = <<EOF;
-        <svg:g id="fooz" style="opacity:$opacity;" transform="translate($offset,
-$offset)">
-            $shadow
-        </svg:g>
-        $element
-EOF
-    return $svg;
-}
-
-
diff --git a/share/extensions/svg_dropshadow.inx b/share/extensions/svg_dropshadow.inx
deleted file mode 100644 (file)
index 42aa077..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<inkscape-extension>
-    <_name>Dropshadow</_name>
-    <id>org.inkscape.filter.dropshadow</id>
-    <dependency type="executable" location="extensions">svg_dropshadow</dependency>
-       <param name="opacity" _gui-text="Opacity" type="float" min="0.0" max="1.0">0.9</param>
-       <param name="color" _gui-text="Color of shadow" type="string">black</param>
-    <effect>
-        <object-type>all</object-type>
-    </effect>
-    <script>
-        <command reldir="extensions" interpreter="perl">svg_dropshadow</command>
-    </script>
-</inkscape-extension>