summersnight.py revision 30bda02595fa0bcf215ceaf3f2e7044cb816c545
"""
Copyright (C) 2005 Aaron Spike, aaron@ekips.org
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
# standard library
import os
# local library
import cubicsuperpath
import inkex
import simplepath
import simpletransform
from ffgeom import *
try:
except:
inkex.errormsg(_("This extension requires two selected paths. \nThe second path must be exactly four nodes long."))
exit()
#obj is selected second
inkex.errormsg(_("The first selected object is of type '%s'.\nTry using the procedure Path->Object to Path." % obj.get(inkex.addNS('type','sodipodi'))))
exit()
#distil trafo into four node points
exit()
#vectors pointing away from the trafo origin
#query inkscape about the bounding box of obj
if bsubprocess:
p = Popen('inkscape --query-%s --query-id=%s "%s"' % (query,id,file), shell=True, stdout=PIPE, stderr=PIPE)
else:
f.close()
else:
inkex.errormsg(_("The second selected object is a group, not a path.\nTry using the procedure Object->Ungroup."))
else:
inkex.errormsg(_("The second selected object is not a path.\nTry using the procedure Path->Object to Path."))
exit()
else:
inkex.errormsg(_("The first selected object is not a path.\nTry using the procedure Path->Object to Path."))
exit()
p = cubicsuperpath.parsePath(d)
for subs in p:
def trafopoint(self,(x,y)):
#Transform algorithm thanks to Jose Hevia (freon)
return [p['x'],p['y']]
if __name__ == '__main__':
e = Project()
e.affect()
# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 fileencoding=utf-8 textwidth=99