svg_dropshadow revision 6b15695578f07a3f72c4c9475c1a261a3021472a
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# svg_dropshadow
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Creates drop shadows for all svg elements specified by --id, or
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# whole file if no ids are given.
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User# Authors: Daniel Goude (goude@dtek.chalmers.se)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# Set the script name, used when displaying --help
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# Set usage string (options are handled separately).
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyCreates drop shadows from svg group(s)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Set script specific options and description (used for --help)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# SpSVG will hasdle in/out files, and help
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Read input file (from --file or STDIN)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Apply make_shadow to selected ids, or whole file
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Dump the file (to --output or STDOUT)
b7a823a402eb5c4e99f283e58d778a903d2e72f5Michał Kępień# make_shadow takes an svg fragment and returns named fragment
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# with a shadow added
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $shadow =~ s/(stroke|fill):[^;]+;/$1:$color;/ig;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <svg:g id="fooz" style="opacity:$opacity;" transform="translate($offset,