grid_polar.py revision 9fefe969c78790b255996a6fa8ebe02c403761ba
'''
Copyright (C) 2007 John Beard john.j.beard@gmail.com
##This extension allows you to draw a polar grid in Inkscape.
##There is a wide range of options including subdivision and labels.
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
'''
import inkex
import simplestyle, sys
from math import *
'r':str(r),
'fill-opacity': '1.0', 'stroke': 'none',
'font-weight': 'normal', 'font-style': 'normal', 'fill': '#000000'}
help="Circular Divisions")
help="Circular Division Spacing")
help="Circular Subdivisions per Major division")
help="Logarithmic subdivisions if true")
help="Major Circular Division Line thickness")
help="Minor Circular Division Line thickness")
help="Angle Divisions")
help="Angle Divisions at Centre")
help="Angcular Subdivisions per Major division")
help="Angular Subdivisions end 'n' major circular divisions before the centre")
help="Major Angular Division Line thickness")
help="Minor Angular Division Line thickness")
help="Diameter of Centre Dot")
help="The kind of labels to apply")
help="The nominal pixel size of the circumferential labels")
help="The radial outset of the circumferential labels")
# Embed grid in group
#Put in in the centre of the current view
'transform':t }
#Create SVG circles
else: #linear subdivs
else: #we need separate lines
numeral_size = 0.73*label_size #numerals appear to be 0.73 the height of the nominal pixel size of the font in "Sans"
e = Grid_Polar()
e.affect()