diff options
| author | Alvin Penner <penner@vaxxine.com> | 2008-12-23 02:27:45 +0000 |
|---|---|---|
| committer | alvinpenner <alvinpenner@users.sourceforge.net> | 2008-12-23 02:27:45 +0000 |
| commit | ec7d6d816dfd28148b6636bba8b0ffc151215777 (patch) | |
| tree | 13b992273254c4ca4d9ac7ad37b5a6ed82faacd6 | |
| parent | Some accuracy improvements for nr-filter-colormatrix (including some changes ... (diff) | |
| download | inkscape-ec7d6d816dfd28148b6636bba8b0ffc151215777.tar.gz inkscape-ec7d6d816dfd28148b6636bba8b0ffc151215777.zip | |
add support for quadratic Bezier
(bzr r7024)
| -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 6c759ba8f..ffb1194c8 100644 --- a/share/extensions/dxf_input.py +++ b/share/extensions/dxf_input.py @@ -65,10 +65,14 @@ def export_LINE(): def export_SPLINE():
# mandatory group codes : (10, 20, 70) (x, y, flags)
if vals[groups['10']] and vals[groups['20']] and vals[groups['70']]:
- if vals[groups['70']][0] == 8 and len(vals[groups['10']]) == 4 and len(vals[groups['20']]) == 4:
+ if not (vals[groups['70']][0] & 3) and len(vals[groups['10']]) == 4 and len(vals[groups['20']]) == 4:
path = 'M %f,%f C %f,%f %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])
attribs = {'d': path, 'style': style}
inkex.etree.SubElement(doc.getroot(), 'path', attribs)
+ if not (vals[groups['70']][0] & 3) and len(vals[groups['10']]) == 3 and len(vals[groups['20']]) == 3:
+ 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(doc.getroot(), 'path', attribs)
def export_CIRCLE():
# mandatory group codes : (10, 20, 40) (x, y, radius)
|
