summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 978da2e)
raw | patch | inline | side by side (parent: 978da2e)
author | alvinpenner <alvinpenner@users.sourceforge.net> | |
Wed, 22 Apr 2009 02:24:28 +0000 (02:24 +0000) | ||
committer | alvinpenner <alvinpenner@users.sourceforge.net> | |
Wed, 22 Apr 2009 02:24:28 +0000 (02:24 +0000) |
share/extensions/dxf_outlines.py | patch | blob | history |
index d146a8c7739bcf0f543384546e0ad83ab3a29357..6ff0c1a24176cdd3a6c69adb3652ac7500e4056b 100755 (executable)
for node in self.document.getroot().xpath(path, namespaces=inkex.NSS):
style = node.get('style')
start = style.find("stroke:")
- rgb = simplestyle.parseColor(style[(start+7):(start+14)])
+ if style[start+11] == ';':
+ rgb = simplestyle.parseColor(style[(start+7):(start+11)])
+ elif style[start+14] == ';':
+ rgb = simplestyle.parseColor(style[(start+7):(start+14)])
+ else:
+ rgb = (0,0,0)
hsl = coloreffect.ColorEffect.rgb_to_hsl(coloreffect.ColorEffect(),rgb[0]/255.0,rgb[1]/255.0,rgb[2]/255.0)
self.color = 7 # default is black
if hsl[2]: