summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8f65ed1)
raw | patch | inline | side by side (parent: 8f65ed1)
author | acspike <acspike@users.sourceforge.net> | |
Sun, 9 Mar 2008 19:22:10 +0000 (19:22 +0000) | ||
committer | acspike <acspike@users.sourceforge.net> | |
Sun, 9 Mar 2008 19:22:10 +0000 (19:22 +0000) |
share/extensions/dxf_outlines.py | patch | blob | history |
index 2e20af56d47db0aa47065f4fc4a41acf37c3d856..ab093a140dfad919c65e7ed481d52965b362744b 100755 (executable)
class MyEffect(inkex.Effect):
def __init__(self):
inkex.Effect.__init__(self)
- self.dxf = ''
+ self.dxf = []
self.handle = 255 # initiallize handle for DXF ENTITY
def output(self):
- print self.dxf
+ print ''.join(self.dxf)
def dxf_add(self, str):
- self.dxf += str
+ self.dxf.append(str)
def dxf_line(self,csp):
self.dxf_add(" 0\nLINE\n 5\n%x\n100\nAcDbEntity\n 8\n0\n100\nAcDbLine\n" % self.handle)
self.dxf_add(" 10\n%f\n 20\n%f\n 30\n0.0\n 11\n%f\n 21\n%f\n 31\n0.0\n" % (csp[0][0],csp[0][1],csp[1][0],csp[1][1]))