On Thu, 09 Apr 2009 12:13:13 -0700 "G33K" <g99999k@...2136...> wrote:
About the ffgeom import, I copied that from another extension. I'm not sure if it's needed, but I seem to recall that some math stuff wouldn't work without that line.
Sadly, the envelope can currently only work with cubic bezier curves (C type). Otherwise, you'll get that exception (Like for L, a straight line segment). Try to tweak your envelope so that all 4 sides are cubics, maybe then it will work.
Ok, also you have to select the letter first, and then the envelope. Yep, I bent all 4 sides of the envelope, but instead of the "Unsupported segment type L" error I now get:
Traceback (most recent call last): File "/home/tbrown/.inkscape/extensions/bezierenvelope.py", line 305, in <module> e.affect() File "/mnt/usr1/usr1/home/tbrown/.inkscape/extensions/inkex.py", line 154, in affect self.effect() File "/home/tbrown/.inkscape/extensions/bezierenvelope.py", line 98, in effect morphElement( letterElement, envelopeElement, axes ); File "/home/tbrown/.inkscape/extensions/bezierenvelope.py", line 102, in morphElement morphedPath = morphPath( path, axes ) File "/home/tbrown/.inkscape/extensions/bezierenvelope.py", line 118, in morphPath mapPointsToMorph( axes, percentages, morphed, numPts ) File "/home/tbrown/.inkscape/extensions/bezierenvelope.py", line 232, in mapPointsToMorph xTransform = match( yAnchor0, yAnchor1, xSpot0, xSpot1 ) File "/home/tbrown/.inkscape/extensions/bezierenvelope.py", line 289, in match t2 = simpletransform.parseTransform( "rotate(%f)"%(-angle_p) ) File "/mnt/usr1/usr1/home/tbrown/.inkscape/extensions/simpletransform.py", line 70, in parseTransform matrix=composeTransform(mat,matrix) UnboundLocalError: local variable 'matrix' referenced before assignment
Cheers -Terry
(The "letter" can contain other segments, but they won't look pretty since a straight line will remain straight.)
The easiest way to fix this is to convert all segments of the envelope to cubics. Not that hard, but I would prefer to use an existing funcion for that, if there is any. Would you know one?
On Thu, 09 Apr 2009 13:54 -0500, "Terry Brown" <terry_n_brown@...36...> wrote:
On Thu, 9 Apr 2009 13:49:46 -0500 Terry Brown <terry_n_brown@...36...> wrote:
I finished porting my old Bezier enveloping function from Batik/Java to Inkscape/Python. I'll call it "Bezier Envelope".
Sounds good - where do you get the ffgeom module it requires?
Whoops - I see it's in the devel. version.
Still didn't get output though, always got "Unsupported segment type L", or is that because my devel. version is stale?
Cheers -Terry
This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel