convert2dashes.py revision f50c442e2dda83c64fd5dc9109a7d5e7e6e4c1bc
'''
This extension converts a path into a dashed line using 'stroke-dasharray'
It is a modification of the file addnodes.py
Copyright (C) 2005,2007 Aaron Spike, aaron@ekips.org
Copyright (C) 2009 Alvin Penner, penner@vaxxine.com
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
import gettext
dashes = []
if dashes:
new = []
for sub in p:
idash = 0
length = 0
i = 1
else: # splice the curve
if idash % 2:
else:
i+=1
del style['stroke-dasharray']
else:
inkex.errormsg(_("The selected object is not a path.\nTry using the procedure Path->Object to Path."))
if __name__ == '__main__':
e = SplitIt()
e.affect()
# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 fileencoding=utf-8 textwidth=99