-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReadMe.txt
71 lines (38 loc) · 2.35 KB
/
ReadMe.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
SVGSlice version 0.13
#####################
First of all, read "Issues", below.
Installation
============
In a normal inkscape distro installation, copy the files:
svgslice.inx
svgslice.py
to:
/usr/share/inkscape/extensions
If your inkscape extensions directory is somewhere other than this, then you need
to edit both files to use your chosen directory.
Usage
=====
* Draw something.
* Create a layer called "slices".
* Draw rectangles in this layer representing the areas you want to slice
(note: it helps if you make the rectangles semi-transparent)
* Optionally, name any/all slices by using the built-in XML editor to edit the
"id" attributes of the rectangles.
* Hide the slices layer.
* Choose "Save as..." from the File menu.
* Select "XHTML file with PNG slices" as the file type to use.
* Enter a filename (e.g., "test.xhtml"), and save.
Result
======
* You should have the test.xhtml file on your disk, alongside the PNG slices
for each area of the drawing that you made a rectangle for.
Issues
======
Starting Inkscape from the right directory
------------------------------------------
The Inkscape plugin mechanism was never really designed for outputting more than one file at a time. As such, it doesn't give plugins any idea of where they should save their output. So, the only way that SVGSlice can save slices in the same directory as your svg drawing is if Inkscape is started IN that directory. Generally, the way to do this is to load the SVG drawing by double-clicking on it, rather than loading Inkscape and then opening your drawing.
AGAIN: open your SVG files from their icons, rather then from a pre-loaded copy if inkscape, if you want slices to be saved in the right place.
Sorry for this inconvenience, but there's really nothing I can do until the Inkscape developers come up with a better plugin system.
Windows Support
---------------
SVGSlice is developed for unix workstations like BSD and Linux; not Microsoft Windows. Furthermore, the Inkscape plugin API seems to work differently on each platform. How to get it working on a non-POSIX-compliant platform like Windows is left as an exercise for the reader. The main things you'll need to do are: a) install in the right place and change directory paths within the files to match; and b) modify the command lines executed within svgslice.py so that windows understands them.