dimension.py revision 50b3600a3249846db09ea119a78845b092780986
'''
An Inkscape effect for adding CAD style dimensions to selected objects
in a drawing.
It uses the selection's bounding box, so if the bounding box has empty
space in the x- or y-direction (such as with some stars) the results
will look strange. Strokes might also overlap the edge of the
bounding box.
Path" effect to add measurements.
This code contains snippets from existing effects in the Inkscape
extensions library, and marker data from markers.svg.
Copyright (C) 2007 Peter Lewerin, peter.lewerin@tele2.se
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
'''
from simpletransform import *
help="x offset of the vertical dimension arrow")
help="y offset of the horizontal dimension arrow")
if not defs:
if rotate:
else:
return line
return line
# Avoid ugly failure on rects and texts.
try:
except TypeError:
e = Dimension()
e.affect()
# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 encoding=utf-8 textwidth=99