summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c15efac)
raw | patch | inline | side by side (parent: c15efac)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 15 Nov 2006 09:04:37 +0000 (09:04 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 15 Nov 2006 09:04:37 +0000 (09:04 +0000) |
28 files changed:
index 33afbd014d738bdc17ee160b8bc30236657bdc19..bc0c0b49f9ef0d3d064a22dbde891499fc2a3fa4 100644 (file)
webbrowser_reportabug.py \
webbrowser_svgspec.py \
webbrowser_commandline.py \
- webbrowser_faq.py
+ webbrowser_faq.py\
+ color_custom.py\
+ color_desaturate.py\
+ coloreffect.py\
+ color_grayscale.py\
+ color_brighter.py\
+ color_darker.py\
+ color_keepblue.py\
+ color_keepgreen.py\
+ color_keepred.py\
+ color_negative.py\
+ color_removeblue.py\
+ color_removegreen.py\
+ color_removered.py\
+ color_rgbbarrel.py
+
otherstuff = \
aisvg.xslt
inkscape_help_reportabug.inx \
inkscape_help_svgspec.inx \
inkscape_help_commandline.inx \
- inkscape_help_faq.inx
+ inkscape_help_faq.inx\
+ color_brighter.inx\
+ color_darker.inx\
+ color_desaturate.inx\
+ color_grayscale.inx\
+ color_negative.inx\
+ color_keepblue.inx\
+ color_keepgreen.inx\
+ color_keepred.inx\
+ color_removeblue.inx\
+ color_removegreen.inx\
+ color_removered.inx\
+ color_rgbbarrel.inx\
+ color_custom.inx
extension_SCRIPTS = \
diff --git a/share/extensions/color_brighter.inx b/share/extensions/color_brighter.inx
--- /dev/null
@@ -0,0 +1,16 @@
+<inkscape-extension>\r
+ <_name>Brighter</_name>\r
+ <id>com.kaioa.brighter</id>\r
+ <dependency type="executable" location="extensions">coloreffect.py</dependency>\r
+ <dependency type="executable" location="extensions">color_brighter.py</dependency>\r
+ <dependency type="executable" location="extensions">simplestyle.py</dependency>\r
+ <effect>\r
+ <object-type>all</object-type>\r
+ <effects-menu>\r
+ <submenu _name="Color"/>\r
+ </effects-menu>\r
+ </effect>\r
+ <script>\r
+ <command reldir="extensions" interpreter="python">color_brighter.py</command>\r
+ </script>\r
+</inkscape-extension>
\ No newline at end of file
diff --git a/share/extensions/color_brighter.py b/share/extensions/color_brighter.py
--- /dev/null
@@ -0,0 +1,24 @@
+import coloreffect\r
+\r
+class C(coloreffect.ColorEffect):\r
+ def colmod(self,r,g,b):\r
+ FACTOR=0.9
+ \r
+ i=int(1.0/(1.0-FACTOR))\r
+ if r==0 and g==0 and b==0:\r
+ return '%02x%02x%02x' % (i,i,i)\r
+ if r>0 and r<i:\r
+ r=i\r
+ if g>0 and g<i:\r
+ g=i\r
+ if b>0 and b<i:\r
+ b=i;\r
+\r
+ r=min(int(round((r/FACTOR))), 255)\r
+ g=min(int(round((g/FACTOR))), 255)\r
+ b=min(int(round((b/FACTOR))), 255)\r
+ \r
+ return '%02x%02x%02x' % (r,g,b)\r
+\r
+c = C()\r
+c.affect()
\ No newline at end of file
diff --git a/share/extensions/color_custom.inx b/share/extensions/color_custom.inx
--- /dev/null
@@ -0,0 +1,19 @@
+<inkscape-extension>\r
+ <_name>Custom</_name>\r
+ <id>com.kaioa.zcustom</id>\r
+ <dependency type="executable" location="extensions">coloreffect.py</dependency>\r
+ <dependency type="executable" location="extensions">color_custom.py</dependency>\r
+ <dependency type="executable" location="extensions">simplestyle.py</dependency>\r
+ <param name="r" type="string" _gui-text="Red Function">r</param>\r
+ <param name="g" type="string" _gui-text="Green Function">g</param>\r
+ <param name="b" type="string" _gui-text="Blue Function">b</param>\r
+ <effect>\r
+ <object-type>all</object-type>\r
+ <effects-menu>\r
+ <submenu _name="Color"/>\r
+ </effects-menu>\r
+ </effect>\r
+ <script>\r
+ <command reldir="extensions" interpreter="python">color_custom.py</command>\r
+ </script>\r
+</inkscape-extension>
\ No newline at end of file
diff --git a/share/extensions/color_custom.py b/share/extensions/color_custom.py
--- /dev/null
@@ -0,0 +1,31 @@
+import coloreffect\r
+\r
+class C(coloreffect.ColorEffect):\r
+ def __init__(self):\r
+ coloreffect.ColorEffect.__init__(self)\r
+ self.OptionParser.add_option("--r", action="store", type="string", dest="rFunction", default="r",help="red channel function")\r
+ self.OptionParser.add_option("--g", action="store", type="string", dest="gFunction", default="g",help="green channel function")\r
+ self.OptionParser.add_option("--b", action="store", type="string", dest="bFunction", default="b",help="blue channel function")\r
+ def normalize(self, v):\r
+ if v<0:\r
+ return 0.0\r
+ if v>1:\r
+ return 1.0\r
+ return v\r
+ def colmod(self,_r,_g,_b):\r
+ r=float(_r)/255\r
+ g=float(_g)/255\r
+ b=float(_b)/255\r
+ #coloreffect.debug('I: %f %f %f' % (r,g,b))\r
+ r=eval(self.options.rFunction)\r
+ g=eval(self.options.gFunction)\r
+ b=eval(self.options.bFunction)\r
+ #coloreffect.debug('E: %f %f %f' % (r,g,b))\r
+ r=self.normalize(r)\r
+ g=self.normalize(g)\r
+ b=self.normalize(b)\r
+ #coloreffect.debug('N: %f %f %f' % (r,g,b))\r
+ return '%02x%02x%02x' % (int(round(r*255)),int(round(g*255)),int(round(b*255)))\r
+\r
+c = C()\r
+c.affect()
\ No newline at end of file
diff --git a/share/extensions/color_darker.inx b/share/extensions/color_darker.inx
--- /dev/null
@@ -0,0 +1,16 @@
+<inkscape-extension>\r
+ <_name>Darker</_name>\r
+ <id>com.kaioa.darker</id>\r
+ <dependency type="executable" location="extensions">coloreffect.py</dependency>\r
+ <dependency type="executable" location="extensions">color_darker.py</dependency>\r
+ <dependency type="executable" location="extensions">simplestyle.py</dependency>\r
+ <effect>\r
+ <object-type>all</object-type>\r
+ <effects-menu>\r
+ <submenu _name="Color"/>\r
+ </effects-menu>\r
+ </effect>\r
+ <script>\r
+ <command reldir="extensions" interpreter="python">color_darker.py</command>\r
+ </script>\r
+</inkscape-extension>
\ No newline at end of file
diff --git a/share/extensions/color_darker.py b/share/extensions/color_darker.py
--- /dev/null
@@ -0,0 +1,12 @@
+import coloreffect\r
+\r
+class C(coloreffect.ColorEffect):\r
+ def colmod(self,r,g,b):\r
+ FACTOR=0.9
+ r=int(round(max(r*FACTOR,0)))\r
+ g=int(round(max(g*FACTOR,0)))\r
+ b=int(round(max(b*FACTOR,0)))\r
+ return '%02x%02x%02x' % (r,g,b)\r
+\r
+c = C()\r
+c.affect()
\ No newline at end of file
diff --git a/share/extensions/color_desaturate.inx b/share/extensions/color_desaturate.inx
--- /dev/null
@@ -0,0 +1,16 @@
+<inkscape-extension>\r
+ <_name>Desaturate</_name>\r
+ <id>com.kaioa.desaturate</id>\r
+ <dependency type="executable" location="extensions">coloreffect.py</dependency>\r
+ <dependency type="executable" location="extensions">color_desaturate.py</dependency>\r
+ <dependency type="executable" location="extensions">simplestyle.py</dependency>\r
+ <effect>\r
+ <object-type>all</object-type>\r
+ <effects-menu>\r
+ <submenu _name="Color"/>\r
+ </effects-menu>\r
+ </effect>\r
+ <script>\r
+ <command reldir="extensions" interpreter="python">color_desaturate.py</command>\r
+ </script>\r
+</inkscape-extension>
\ No newline at end of file
diff --git a/share/extensions/color_desaturate.py b/share/extensions/color_desaturate.py
--- /dev/null
@@ -0,0 +1,10 @@
+import coloreffect\r
+\r
+class C(coloreffect.ColorEffect):\r
+ def colmod(self,r,g,b):\r
+ l = (max(r,g,b)+min(r,g,b))/2\r
+ ig=int(round(l))\r
+ return '%02x%02x%02x' % (ig,ig,ig)\r
+\r
+c = C()\r
+c.affect()
\ No newline at end of file
diff --git a/share/extensions/color_grayscale.inx b/share/extensions/color_grayscale.inx
--- /dev/null
@@ -0,0 +1,16 @@
+<inkscape-extension>\r
+ <_name>Grayscale</_name>\r
+ <id>com.kaioa.grayscale</id>\r
+ <dependency type="executable" location="extensions">coloreffect.py</dependency>\r
+ <dependency type="executable" location="extensions">color_grayscale.py</dependency>\r
+ <dependency type="executable" location="extensions">simplestyle.py</dependency>\r
+ <effect>\r
+ <object-type>all</object-type>\r
+ <effects-menu>\r
+ <submenu _name="Color"/>\r
+ </effects-menu>\r
+ </effect>\r
+ <script>\r
+ <command reldir="extensions" interpreter="python">color_grayscale.py</command>\r
+ </script>\r
+</inkscape-extension>
\ No newline at end of file
diff --git a/share/extensions/color_grayscale.py b/share/extensions/color_grayscale.py
--- /dev/null
@@ -0,0 +1,14 @@
+import coloreffect\r
+\r
+class C(coloreffect.ColorEffect):\r
+ def colmod(self,r,g,b):\r
+ #ITU-R Recommendation BT.709\r
+ #l = 0.2125 * r + 0.7154 * g + 0.0721 * b\r
+ #NTSC and PAL\r
+ l = 0.299 * r + 0.587 * g + 0.114 * b\r
+ ig=int(round(l))\r
+ #coloreffect.debug('gs '+hex(r)+' '+hex(g)+' '+hex(b)+'%02x%02x%02x' % (ig,ig,ig))\r
+ return '%02x%02x%02x' % (ig,ig,ig)\r
+\r
+c = C()\r
+c.affect()
\ No newline at end of file
diff --git a/share/extensions/color_keepblue.inx b/share/extensions/color_keepblue.inx
--- /dev/null
@@ -0,0 +1,16 @@
+<inkscape-extension>\r
+ <_name>Keep Blue</_name>\r
+ <id>com.kaioa.keepblue</id>\r
+ <dependency type="executable" location="extensions">coloreffect.py</dependency>\r
+ <dependency type="executable" location="extensions">color_keepblue.py</dependency>\r
+ <dependency type="executable" location="extensions">simplestyle.py</dependency>\r
+ <effect>\r
+ <object-type>all</object-type>\r
+ <effects-menu>\r
+ <submenu _name="Color"/>\r
+ </effects-menu>\r
+ </effect>\r
+ <script>\r
+ <command reldir="extensions" interpreter="python">color_keepblue.py</command>\r
+ </script>\r
+</inkscape-extension>
\ No newline at end of file
diff --git a/share/extensions/color_keepblue.py b/share/extensions/color_keepblue.py
--- /dev/null
@@ -0,0 +1,8 @@
+import coloreffect\r
+\r
+class C(coloreffect.ColorEffect):\r
+ def colmod(self,r,g,b):\r
+ return '%02x%02x%02x' % (0,0,b)\r
+\r
+c = C()\r
+c.affect()
\ No newline at end of file
diff --git a/share/extensions/color_keepgreen.inx b/share/extensions/color_keepgreen.inx
--- /dev/null
@@ -0,0 +1,16 @@
+<inkscape-extension>\r
+ <_name>Keep Green</_name>\r
+ <id>com.kaioa.keepgreen</id>\r
+ <dependency type="executable" location="extensions">coloreffect.py</dependency>\r
+ <dependency type="executable" location="extensions">color_keepgreen.py</dependency>\r
+ <dependency type="executable" location="extensions">simplestyle.py</dependency>\r
+ <effect>\r
+ <object-type>all</object-type>\r
+ <effects-menu>\r
+ <submenu _name="Color"/>\r
+ </effects-menu>\r
+ </effect>\r
+ <script>\r
+ <command reldir="extensions" interpreter="python">color_keepgreen.py</command>\r
+ </script>\r
+</inkscape-extension>
\ No newline at end of file
diff --git a/share/extensions/color_keepgreen.py b/share/extensions/color_keepgreen.py
--- /dev/null
@@ -0,0 +1,8 @@
+import coloreffect\r
+\r
+class C(coloreffect.ColorEffect):\r
+ def colmod(self,r,g,b):\r
+ return '%02x%02x%02x' % (0,g,0)\r
+\r
+c = C()\r
+c.affect()
\ No newline at end of file
diff --git a/share/extensions/color_keepred.inx b/share/extensions/color_keepred.inx
--- /dev/null
@@ -0,0 +1,16 @@
+<inkscape-extension>\r
+ <_name>Keep Red</_name>\r
+ <id>com.kaioa.keepred</id>\r
+ <dependency type="executable" location="extensions">coloreffect.py</dependency>\r
+ <dependency type="executable" location="extensions">color_keepred.py</dependency>\r
+ <dependency type="executable" location="extensions">simplestyle.py</dependency>\r
+ <effect>\r
+ <object-type>all</object-type>\r
+ <effects-menu>\r
+ <submenu _name="Color"/>\r
+ </effects-menu>\r
+ </effect>\r
+ <script>\r
+ <command reldir="extensions" interpreter="python">color_keepred.py</command>\r
+ </script>\r
+</inkscape-extension>
\ No newline at end of file
diff --git a/share/extensions/color_keepred.py b/share/extensions/color_keepred.py
--- /dev/null
@@ -0,0 +1,8 @@
+import coloreffect\r
+\r
+class C(coloreffect.ColorEffect):\r
+ def colmod(self,r,g,b):\r
+ return '%02x%02x%02x' % (r,0,0)\r
+\r
+c = C()\r
+c.affect()
\ No newline at end of file
diff --git a/share/extensions/color_negative.inx b/share/extensions/color_negative.inx
--- /dev/null
@@ -0,0 +1,16 @@
+<inkscape-extension>\r
+ <_name>Negative</_name>\r
+ <id>com.kaioa.negative</id>\r
+ <dependency type="executable" location="extensions">coloreffect.py</dependency>\r
+ <dependency type="executable" location="extensions">color_negative.py</dependency>\r
+ <dependency type="executable" location="extensions">simplestyle.py</dependency>\r
+ <effect>\r
+ <object-type>all</object-type>\r
+ <effects-menu>\r
+ <submenu _name="Color"/>\r
+ </effects-menu>\r
+ </effect>\r
+ <script>\r
+ <command reldir="extensions" interpreter="python">color_negative.py</command>\r
+ </script>\r
+</inkscape-extension>
\ No newline at end of file
diff --git a/share/extensions/color_negative.py b/share/extensions/color_negative.py
--- /dev/null
@@ -0,0 +1,8 @@
+import coloreffect\r
+\r
+class C(coloreffect.ColorEffect):\r
+ def colmod(self,r,g,b):\r
+ return '%02x%02x%02x' % (255-r,255-g,255-b)\r
+\r
+c = C()\r
+c.affect()
\ No newline at end of file
diff --git a/share/extensions/color_removeblue.inx b/share/extensions/color_removeblue.inx
--- /dev/null
@@ -0,0 +1,16 @@
+<inkscape-extension>\r
+ <_name>Remove Blue</_name>\r
+ <id>com.kaioa.removeblue</id>\r
+ <dependency type="executable" location="extensions">coloreffect.py</dependency>\r
+ <dependency type="executable" location="extensions">color_removeblue.py</dependency>\r
+ <dependency type="executable" location="extensions">simplestyle.py</dependency>\r
+ <effect>\r
+ <object-type>all</object-type>\r
+ <effects-menu>\r
+ <submenu _name="Color"/>\r
+ </effects-menu>\r
+ </effect>\r
+ <script>\r
+ <command reldir="extensions" interpreter="python">color_removeblue.py</command>\r
+ </script>\r
+</inkscape-extension>
\ No newline at end of file
diff --git a/share/extensions/color_removeblue.py b/share/extensions/color_removeblue.py
--- /dev/null
@@ -0,0 +1,8 @@
+import coloreffect\r
+\r
+class C(coloreffect.ColorEffect):\r
+ def colmod(self,r,g,b):\r
+ return '%02x%02x%02x' % (r,g,0)\r
+\r
+c = C()\r
+c.affect()
\ No newline at end of file
diff --git a/share/extensions/color_removegreen.inx b/share/extensions/color_removegreen.inx
--- /dev/null
@@ -0,0 +1,16 @@
+<inkscape-extension>\r
+ <_name>Remove Green</_name>\r
+ <id>com.kaioa.removegreen</id>\r
+ <dependency type="executable" location="extensions">coloreffect.py</dependency>\r
+ <dependency type="executable" location="extensions">color_removegreen.py</dependency>\r
+ <dependency type="executable" location="extensions">simplestyle.py</dependency>\r
+ <effect>\r
+ <object-type>all</object-type>\r
+ <effects-menu>\r
+ <submenu _name="Color"/>\r
+ </effects-menu>\r
+ </effect>\r
+ <script>\r
+ <command reldir="extensions" interpreter="python">color_removegreen.py</command>\r
+ </script>\r
+</inkscape-extension>
\ No newline at end of file
diff --git a/share/extensions/color_removegreen.py b/share/extensions/color_removegreen.py
--- /dev/null
@@ -0,0 +1,8 @@
+import coloreffect\r
+\r
+class C(coloreffect.ColorEffect):\r
+ def colmod(self,r,g,b):\r
+ return '%02x%02x%02x' % (r,0,b)\r
+\r
+c = C()\r
+c.affect()
\ No newline at end of file
diff --git a/share/extensions/color_removered.inx b/share/extensions/color_removered.inx
--- /dev/null
@@ -0,0 +1,16 @@
+<inkscape-extension>\r
+ <_name>Remove Red</_name>\r
+ <id>com.kaioa.removered</id>\r
+ <dependency type="executable" location="extensions">coloreffect.py</dependency>\r
+ <dependency type="executable" location="extensions">color_removered.py</dependency>\r
+ <dependency type="executable" location="extensions">simplestyle.py</dependency>\r
+ <effect>\r
+ <object-type>all</object-type>\r
+ <effects-menu>\r
+ <submenu _name="Color"/>\r
+ </effects-menu>\r
+ </effect>\r
+ <script>\r
+ <command reldir="extensions" interpreter="python">color_removered.py</command>\r
+ </script>\r
+</inkscape-extension>
\ No newline at end of file
diff --git a/share/extensions/color_removered.py b/share/extensions/color_removered.py
--- /dev/null
@@ -0,0 +1,8 @@
+import coloreffect\r
+\r
+class C(coloreffect.ColorEffect):\r
+ def colmod(self,r,g,b):\r
+ return '%02x%02x%02x' % (0,g,b)\r
+\r
+c = C()\r
+c.affect()
\ No newline at end of file
diff --git a/share/extensions/color_rgbbarrel.inx b/share/extensions/color_rgbbarrel.inx
--- /dev/null
@@ -0,0 +1,16 @@
+<inkscape-extension>\r
+ <_name>RGB Barrel</_name>\r
+ <id>com.kaioa.rgbbarrel</id>\r
+ <dependency type="executable" location="extensions">coloreffect.py</dependency>\r
+ <dependency type="executable" location="extensions">color_rgbbarrel.py</dependency>\r
+ <dependency type="executable" location="extensions">simplestyle.py</dependency>\r
+ <effect>\r
+ <object-type>all</object-type>\r
+ <effects-menu>\r
+ <submenu _name="Color"/>\r
+ </effects-menu>\r
+ </effect>\r
+ <script>\r
+ <command reldir="extensions" interpreter="python">color_rgbbarrel.py</command>\r
+ </script>\r
+</inkscape-extension>
\ No newline at end of file
diff --git a/share/extensions/color_rgbbarrel.py b/share/extensions/color_rgbbarrel.py
--- /dev/null
@@ -0,0 +1,8 @@
+import coloreffect\r
+\r
+class C(coloreffect.ColorEffect):\r
+ def colmod(self,r,g,b):\r
+ return '%02x%02x%02x' % (b,r,g)\r
+\r
+c = C()\r
+c.affect()
\ No newline at end of file
diff --git a/share/extensions/coloreffect.py b/share/extensions/coloreffect.py
--- /dev/null
@@ -0,0 +1,98 @@
+#!/usr/bin/env python \r
+'''\r
+Copyright (C) 2006 Jos Hirth, kaioa.com\r
+\r
+This program is free software; you can redistribute it and/or modify\r
+it under the terms of the GNU General Public License as published by\r
+the Free Software Foundation; either version 2 of the License, or\r
+(at your option) any later version.\r
+\r
+This program is distributed in the hope that it will be useful,\r
+but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+GNU General Public License for more details.\r
+\r
+You should have received a copy of the GNU General Public License\r
+along with this program; if not, write to the Free Software\r
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+'''\r
+import sys, copy, optparse, simplestyle, inkex\r
+\r
+import xml.xpath\r
+\r
+color_props_fill=('fill:','stop-color:','flood-color:','lighting-color:')\r
+color_props_stroke=('stroke:',)\r
+color_props = color_props_fill + color_props_stroke\r
+\r
+class ColorEffect(inkex.Effect):\r
+ def __init__(self):\r
+ inkex.Effect.__init__(self,use_minidom=True)\r
+\r
+ def effect(self):\r
+ if len(self.selected)==0:\r
+ self.getAttribs(self.document)\r
+ else:\r
+ for id,node in self.selected.iteritems():\r
+ self.getAttribs(node)\r
+\r
+ def getAttribs(self,node):\r
+ self.changeStyle(node)\r
+ if node.hasChildNodes():\r
+ childs=node.childNodes\r
+ for child in childs:\r
+ self.getAttribs(child)\r
+ \r
+ def changeStyle(self,node):\r
+ if node.hasAttributes():\r
+ style=node.getAttribute('style') # fixme: this will break for presentation attributes!\r
+ if style!='':\r
+ #inkex.debug('old style:'+style)\r
+ styles=style.split(';')\r
+ for i in range(len(styles)):\r
+ for c in range(len(color_props)):\r
+ if styles[i].startswith(color_props[c]):\r
+ styles[i]=color_props[c]+self.process_prop(styles[i][len(color_props[c]):])\r
+ #inkex.debug('new style:'+';'.join(styles))\r
+ node.setAttribute('style',';'.join(styles))\r
+ '''\r
+ def changeStyle(self,node):\r
+ if node.hasAttributes():\r
+ sa=node.getAttribute('style')\r
+ if sa!='':\r
+ debug(sa)\r
+ styles=simplestyle.parseStyle(sa)\r
+ for c in range(len(colortags)):\r
+ if colortags[c] in styles.keys():\r
+ styles[colortags[c]]=self.process_prop(styles[colortags[c]])\r
+ node.setAttribute('style',simplestyle.formatStyle(styles))\r
+ ''' \r
+ def process_prop(self,col):\r
+ #debug('got:'+col)\r
+ if simplestyle.isColor(col):\r
+ c=simplestyle.parseColor(col)\r
+ col='#'+self.colmod(c[0],c[1],c[2])\r
+ #debug('made:'+col)\r
+ if col.startswith('url(#'):\r
+ id = col[len('url(#'):col.find(')')]\r
+ #inkex.debug('ID:' + id )\r
+ path = '//*[@id="%s"]' % id\r
+ for node in xml.xpath.Evaluate(path,self.document):\r
+ self.process_gradient(node)\r
+ return col\r
+\r
+ def process_gradient(self, node):\r
+ self.changeStyle(node)\r
+ if node.hasChildNodes():\r
+ for child in node.childNodes:\r
+ self.process_gradient(child)\r
+ if node.hasAttributes(): \r
+ href=node.getAttribute('xlink:href')\r
+ if href.startswith('#'):\r
+ id = href[len('#'):len(href)]\r
+ #inkex.debug('ID:' + id )\r
+ path = '//*[@id="%s"]' % id\r
+ for node in xml.xpath.Evaluate(path,self.document):\r
+ self.process_gradient(node)\r
+ \r
+ def colmod(self,r,g,b):\r
+ pass\r