File: //usr/share/inkscape/extensions/grid_cartesian.pyc
�
��Yc @ s� d Z d d l Z d d l Z d d l Z d d l Td d l m Z d � Z d � Z d e j f d � � YZ
e d k r� e
� Z e j
� n d S(
s�
Copyright (C) 2007 John Beard john.j.beard@gmail.com
##This extension allows you to draw a Cartesian grid in Inkscape.
##There is a wide range of options including subdivision, subsubdivions
## and logarithmic scales. Custom line widths are also possible.
##All elements are grouped with similar elements (eg all x-subdivs)
This program is free software; you can redistribute it and/or modify
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.
i����N( t *( t computePointInNodec C s� i d d 6t | � d 6d d 6} i t j | � d 6| t j d d � 6d t | � d
t | � d t | � d
t | � d 6} t j j | t j d
d � | � d S( Ns #000000t strokes stroke-widtht nonet fillt stylet labelt inkscapes M t ,s L t dt patht svg( t strt simplestylet formatStylet inkext addNSt etreet
SubElement( t x1t y1t x2t y2t widtht namet parentR t line_attribs( ( s0 /usr/share/inkscape/extensions/grid_cartesian.pyt
draw_SVG_line s
!>c
C s� i d d 6t | � d 6| d 6} i t j | � d 6| t j d d � 6t | � d 6t | � d 6t | � d
6t | � d 6} t j j | t j d d
� | � d S( Ns #000000R s stroke-widthR R R R t xt yR t heightt rectR ( R R
R R R R R (
R R t wt hR R R R R t rect_attribs( ( s0 /usr/share/inkscape/extensions/grid_cartesian.pyt
draw_SVG_rect% s
!7t
Grid_Polarc B s e Z d � Z d � Z RS( c C s� t j j | � | j j d d d d d d d d d �| j j d
d d d d d d d d
d d �| j j d d d d d d d d d d d �| j j d d d d d d d d d d d �| j j d d d d d d d d t d d �| j j d d d d d d d d d
d d �| j j d d d d d d d! d d"