'''
Copyright (C) 2007 John Bintz, jcoswell@cosellproductions.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
return 2 / caliper
help="cover width (in)")
help="cover height (in)")
help="number of pages")
help="paper thickness measurement")
help="paper thickness")
help="cover thickness measurement")
help="cover thickness")
help="cover bleed (in)")
help="remove guides")
help="dummy")
help="dummy")
help="dummy")
help="dummy")
switch = {
"ppi": lambda x: x,
"caliper": lambda x: caliper_to_ppi(x),
"bond_weight": lambda x: bond_weight_to_ppi(x),
"points": lambda x: points_to_ppi(x),
"width": lambda x: x
}
else:
paper_spine = self.options.pages / switch[self.options.paperthicknessmeasurement](self.options.paperthickness)
else:
paper_spine = 0
else:
else:
cover_spine = 0
guides = []
if namedview:
for node in self.document.xpath('/svg:svg/sodipodi:namedview/sodipodi:guide', namespaces=inkex.NSS):
'''
for id, node in self.selected.iteritems():
if node.tag == inkex.addNS('path','svg'):
p = cubicsuperpath.parsePath(node.get('d'))
#lens, total = csplength(p)
#avg = total/numlengths(lens)
#inkex.debug("average segment length: %s" % avg)
new = []
for sub in p:
new.append([sub[0][:]])
i = 1
while i <= len(sub)-1:
length = cspseglength(new[-1][-1], sub[i])
if length > self.options.max:
splits = math.ceil(length/self.options.max)
for s in xrange(int(splits),1,-1):
new[-1][-1], next, sub[i] = cspbezsplitatlength(new[-1][-1], sub[i], 1.0/s)
new[-1].append(next[:])
new[-1].append(sub[i])
i+=1
node.set('d',cubicsuperpath.formatPath(new))
'''
if __name__ == '__main__':
e = PerfectBoundCover()
e.affect()
# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 fileencoding=utf-8 textwidth=99