diff options
| author | Jos Hirth <github@kaioa.com> | 2007-12-02 03:27:17 +0000 |
|---|---|---|
| committer | amphi <amphi@users.sourceforge.net> | 2007-12-02 03:27:17 +0000 |
| commit | ec2edf2bb827849e99c539799ca68b0af45ae1d4 (patch) | |
| tree | 36bddfda873808c916f506759cec575ad5d9468d | |
| parent | Warning cleanup (including OFFSET_OF warning) (diff) | |
| download | inkscape-ec2edf2bb827849e99c539799ca68b0af45ae1d4.tar.gz inkscape-ec2edf2bb827849e99c539799ca68b0af45ae1d4.zip | |
color value overwrite bug fixed
(bzr r4151)
| -rw-r--r-- | share/extensions/color_custom.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/share/extensions/color_custom.py b/share/extensions/color_custom.py index b3daced30..8d66a1668 100644 --- a/share/extensions/color_custom.py +++ b/share/extensions/color_custom.py @@ -16,16 +16,10 @@ class C(coloreffect.ColorEffect): r=float(_r)/255
g=float(_g)/255
b=float(_b)/255
- #coloreffect.debug('I: %f %f %f' % (r,g,b))
- r=eval(self.options.rFunction)
- g=eval(self.options.gFunction)
- b=eval(self.options.bFunction)
- #coloreffect.debug('E: %f %f %f' % (r,g,b))
- r=self.normalize(r)
- g=self.normalize(g)
- b=self.normalize(b)
- #coloreffect.debug('N: %f %f %f' % (r,g,b))
- return '%02x%02x%02x' % (int(round(r*255)),int(round(g*255)),int(round(b*255)))
+ r2=self.normalize(eval(self.options.rFunction))
+ g2=self.normalize(eval(self.options.gFunction))
+ b2=self.normalize(eval(self.options.bFunction))
+ return '%02x%02x%02x' % (int(round(r2*255)),int(round(g2*255)),int(round(b2*255)))
c = C()
c.affect()
\ No newline at end of file |
