~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu4

« back to all changes in this revision

Viewing changes to doc/inkscape-shadow.README

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Ted Gould, Kees Cook
  • Date: 2009-06-24 14:00:43 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624140043-07stp20mry48hqup
Tags: 0.47~pre0-0ubuntu1
* New upstream release

[ Ted Gould ]
* debian/control: Adding libgsl0 and removing version specifics on boost

[ Kees Cook ]
* debian/watch: updated to run uupdate and mangle pre-release versions.
* Dropped patches that have been taken upstream:
  - 01_mips
  - 02-poppler-0.8.3
  - 03-chinese-inkscape
  - 05_fix_latex_patch
  - 06_gcc-4.4
  - 07_cdr2svg
  - 08_skip-bad-utf-on-pdf-import
  - 09_gtk-clist
  - 10_belarussian
  - 11_libpng
  - 12_desktop
  - 13_slider
  - 100_svg_import_improvements
  - 102_sp_pattern_painter_free
  - 103_bitmap_type_print

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
== BLURRED SHADOWS VIA BITMAPS
2
 
 
3
 
The "Make a Bitmap Copy" command (Alt+B) exports a bitmap of 
4
 
the selected objects (with all other objects hidden), saves it as a 
5
 
PNG file in the same directory as the document, and imports it 
6
 
back into the document.
7
 
 
8
 
Via prefs, you can specify an external filter that will be run on the
9
 
PNG file after it is exported but before it is imported back. I use
10
 
this for grayscaling and blurring the image to create a soft drop
11
 
shadow for any object. So for me, Alt+B creates a shadow for
12
 
selected objects, and you can set it up to work the same for you.
13
 
 
14
 
The script itself is share/extensions/inkscape-shadow.sh, though 
15
 
it's not integrated nto the extensions or plugin system in any way. 
16
 
The script requires Imagemagick 6.x to be installed; you can 
17
 
modify the script as you like, probably adapting it for effects
18
 
other than shadows. The script is Unix-only; you can create
19
 
a similar batch file for Windows if you need it (send it to us
20
 
if you do).
21
 
 
22
 
To enable this, you set in your ~/.inkscape/preferences.xml:
23
 
 
24
 
    <group
25
 
        id="createbitmap"
26
 
        minsize="250"
27
 
        filter="/full/path/to/inkscape-shadow.sh"
28
 
        filter_param1="20" />
29
 
 
30
 
Here minsize= gives the minimum size of the generated bitmap in 
31
 
pixels (regardless of the object size); alternatively you can specify 
32
 
resolution= to set the constant resolution (different pixel size
33
 
for different object sizes).
34
 
 
35
 
In filter=, you specify either the full path to the script, or just
36
 
"inkscape-shadow.sh" if the script is in your PATH. The script
37
 
receives the image filename as the first parameter and the
38
 
filter_param1 as the second parameter (more parameters can be 
39
 
added). This particular script interprets that as the blur radius 
40
 
in pixels, but of course that depends on the script you use.
41
 
 
42
 
The inkscape-shadow-white.sh script is the same but creates all-white
43
 
blurred shadows ("glows") instead of all-black.
44
 
 
45
 
NOTE: I'm not going to provide a GUI for the blurred shadows feature,
46
 
for these reasons:
47
 
 
48
 
 1. You have to carry around the shadow PNGs along your SVG. It's
49
 
 inconvenient, and the PNGs may be much larger than the SVG.
50
 
 
51
 
 2. The shadows are not resolution-independent and are not updated
52
 
 automatically. For all this, we need to support the gaussian blur SVG
53
 
 filter (a standard SVG feature). But since we don't have any filter
54
 
 support yet, hence this hack.
55
 
 
56
 
 3. Both Batik and Adobe have (different) problems with displaying PNGs
57
 
 with alpha transparency. (Much like the Internet Exploder - shame on
58
 
 them! :) This means that while this is valid SVG, its usefulness is
59
 
 pretty much limited to Inkscape only.
60
 
 
61
 
Still, for those who desperately need blurred shadows right now (such
62
 
as myself), this feature works well enough. Try it out, it's fun.
63