diff options
| author | Alvin Penner <penner@vaxxine.com> | 2010-12-18 01:19:39 +0000 |
|---|---|---|
| committer | Alvin Penner <penner@vaxxine.com> | 2010-12-18 01:19:39 +0000 |
| commit | 44b3e81057c797849129db959d09e3baa1520bce (patch) | |
| tree | 9aadd831209bc3c0f39ae03675ac62b8c4d9f7c8 | |
| parent | Mnemonics in fill and stroke dialog and menu (diff) | |
| download | inkscape-44b3e81057c797849129db959d09e3baa1520bce.tar.gz inkscape-44b3e81057c797849129db959d09e3baa1520bce.zip | |
support for 5 point spline (Bug 685707)
Fixed bugs:
- https://launchpad.net/bugs/685707
(bzr r9965)
| -rw-r--r-- | share/extensions/dxf_input.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/share/extensions/dxf_input.py b/share/extensions/dxf_input.py index b46477de1..ee52b8c30 100644 --- a/share/extensions/dxf_input.py +++ b/share/extensions/dxf_input.py @@ -88,6 +88,10 @@ def export_SPLINE(): path = 'M %f,%f Q %f,%f %f,%f' % (vals[groups['10']][0], vals[groups['20']][0], vals[groups['10']][1], vals[groups['20']][1], vals[groups['10']][2], vals[groups['20']][2]) attribs = {'d': path, 'style': style} inkex.etree.SubElement(layer, 'path', attribs) + if not (vals[groups['70']][0] & 3) and len(vals[groups['10']]) == 5 and len(vals[groups['20']]) == 5: + path = 'M %f,%f Q %f,%f %f,%f Q %f,%f %f,%f' % (vals[groups['10']][0], vals[groups['20']][0], vals[groups['10']][1], vals[groups['20']][1], vals[groups['10']][2], vals[groups['20']][2], vals[groups['10']][3], vals[groups['20']][3], vals[groups['10']][4], vals[groups['20']][4]) + attribs = {'d': path, 'style': style} + inkex.etree.SubElement(layer, 'path', attribs) def export_CIRCLE(): # mandatory group codes : (10, 20, 40) (x, y, radius) @@ -322,7 +326,7 @@ parser.add_option("--font", action="store", type="string", dest="font", default= parser.add_option("--tab", action="store", type="string", dest="tab", default="Options") parser.add_option("--inputhelp", action="store", type="string", dest="inputhelp", default="") (options, args) = parser.parse_args(inkex.sys.argv[1:]) -doc = inkex.etree.parse(StringIO('<svg xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"></svg>')) +doc = inkex.etree.parse(StringIO('<svg xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" width="%s" height="%s"></svg>' % (210*90/25.4, 297*90/25.4))) desc = inkex.etree.SubElement(doc.getroot(), 'desc', {}) defs = inkex.etree.SubElement(doc.getroot(), 'defs', {}) marker = inkex.etree.SubElement(defs, 'marker', {'id': 'DistanceX', 'orient': 'auto', 'refX': '0.0', 'refY': '0.0', 'style': 'overflow:visible'}) |
