Q: in my extension I have this:
class StyleEffect(GenericAddPathEffect):
def effect(self):
self.xpathSingle(u'svg:defs').insert(0,
inkex.etree.XML('''<svg:linearGradient
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
id="bk2hp_grad"> <stop style="stop-color:#0000ff;stop-opacity:1"
offset="0"
id="b2h_0" />
<stop style="stop-color:#00deff;stop-opacity:1"
offset="0.4"
id="b2h_1" />
<stop style="stop-color:#00deff;stop-opacity:1"
offset="0.6"
id="b2h_2" />
<stop style="stop-color:#0000ff;stop-opacity:1"
offset="1"
id="b2h_3" />
</svg:linearGradient>''')
)
self.xpathSingle(u'svg:defs').insert(1,
inkex.etree.XML('''<svg:linearGradient
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" id="bk2hp_grad_rot"
gradientTransform="rotate(90)" xlink:href="#bk2hp_grad"
/>''') )
self.xpathSingle(u'//*[@id="' + main_path_id() + '"]').set(
'style',
simplestyle.formatStyle({ 'stroke': '#888888', 'stroke-width':
'1pt', 'fill': 'url(#bk2hp_grad_rot)',
}
))
Which generates a linearGradient and a rotated version of it. However, when I
move the path filled with the rotation, it reverts to the non-rotated version.
I'm attaching it here. Why is Inkscape doing it? Is it a bug?
You can find the extension in question here:
https://github.com/shlomif/Shlomi-Fish-Back-to-my-Homepage-Logo/blob/mast...
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish
http://www.shlomifish.org/
NSA Factoids -
http://www.shlomifish.org/humour/bits/facts/NSA/
If the mountain will not come to Muhammad, then Muhammad will go to the
mountain. — Francis Bacon
Please reply to list if it's a mailing list post -
http://shlom.in/reply .