dimension.py revision a825bb04cf2b441c2cb2bd4770c4ed2c6d6b5e02
324N/AAn Inkscape effect for adding CAD style dimensions to selected objects 324N/AIt uses the selection's bounding box, so if the bounding box has empty 919N/Aspace in the x- or y-direction (such as with some stars) the results 919N/Awill look strange. Strokes might also overlap the edge of the 919N/APath" effect to add measurements. 919N/AThis code contains snippets from existing effects in the Inkscape 919N/Aextensions library, and marker data from markers.svg. 919N/ACopyright (C) 2007 Peter Lewerin, peter.lewerin@tele2.se 919N/AThis program is free software; you can redistribute it and/or modify 919N/Ait under the terms of the GNU General Public License as published by 919N/Athe Free Software Foundation; either version 2 of the License, or 919N/A(at your option) any later version. 324N/AThis program is distributed in the hope that it will be useful, 324N/Abut WITHOUT ANY WARRANTY; without even the implied warranty of 324N/AMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 324N/AGNU General Public License for more details. 324N/AYou should have received a copy of the GNU General Public License 970N/Aalong with this program; if not, write to the Free Software 970N/AFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 328N/A help=
"x offset of the vertical dimension arrow")
970N/A help=
"y offset of the horizontal dimension arrow")
arrow.
set(
'd',
'M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z ')
arrow.
set(
'transform',
'scale(0.8) rotate(180) translate(12.5,0)')
arrow.
set(
'transform',
'scale(0.8) translate(12.5,0)')
arrow.
set(
'style',
'fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none')
# Avoid ugly failure on rects and texts. sys.
exit(_(
'Unable to process this object. Try changing it into a path first.'))
line.
set(
'marker-start',
'url(#Arrow1Lstart)')
line.
set(
'marker-end',
'url(#Arrow1Lend)')
line.
set(
'marker-start',
'url(#Arrow1Lstart)')
line.
set(
'marker-end',
'url(#Arrow1Lend)')
# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 encoding=utf-8 textwidth=99