HEX
Server: Apache
System: Linux opal14.opalstack.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User: curbgloabal_opal (1234)
PHP: 8.1.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/share/inkscape/extensions/grid_polar.pyc
�
��Yc@s�dZddlZddlZddlZddlTddlmZd�Zd�Zd�Z	dej
fd	��YZed
kr�e�Z
e
j�ndS(se
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.

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*(tcomputePointInNodec
Cs�idd6t|�d6|d6}itj|�d6t|�d6t|�d6t|�d6|tjd	d
�6}tjj|tjdd�|�}	dS(
Ns#000000tstrokesstroke-widthtfilltstyletcxtcytrtlabeltinkscapetcircletsvg(tstrtsimplestyletformatStyletinkextaddNStetreet
SubElement(
RRRtwidthRtnametparentRtcirc_attribsR
((s,/usr/share/inkscape/extensions/grid_polar.pytdraw_SVG_circles!
c	Cs�idd6t|�d6dd6}itj|�d6|tjdd�6d	t|�d
t|�dt|�d
t|�d6}tjj|tjd
d�|�dS(Ns#000000Rsstroke-widthtnoneRRRR	sM t,s L tdtpathR(RR
RRRRR(	tx1ty1tx2ty2RRRRtline_attribs((s,/usr/share/inkscape/extensions/grid_polar.pyt
draw_SVG_line$s
!>c	Cs�i	dd6dd6dd6t|�dd6d	d
6dd6d
d6d
d6dd6}itj|�d6|tjdd�6t|�d6t|�d6}tjj|tjdd�|�}||_dS(Ntcenters
text-alignttopsvertical-aligntmiddlestext-anchortpxs	font-sizes1.0sfill-opacityRRtnormalsfont-weights
font-styles#000000RRRR	txtyttextR(RR
RRRRRR)(	R'R(tstringt	font_sizeRRRt
label_attribsR((s,/usr/share/inkscape/extensions/grid_polar.pytdraw_SVG_label_centred+s$t
Grid_PolarcBseZd�Zd�ZRS(cCstjj|�|jjddddddddd	�|jjd
dddddddd
dd�|jjddddddddddd�|jjddddddddddd�|jjddddddddtdd�|jjddddddddddd �|jjd!dddddd"dd#dd$�|jjd%dddddd&dd'dd(�|jjd)dddddd*dd+dd,�|jjd-dddddd.dd#dd/�|jjd0dddddd1dd#dd2�|jjd3dddddd4dddd5�|jjd6dddddd7dd#dd8�|jjd9dddddd:dd;dd<�|jjd=dddddd>dd?dd@�|jjdAddddddBddCddD�|jjdEddddddFdd'ddG�dS(HNs--tabtactiontstorettypeR*tdestttabtdefaulttcircular_divs--r_divstinttr_divsithelpsCircular Divisionss--drtfloattdri2sCircular Division Spacings--r_subdivst	r_subdivsis(Circular Subdivisions per Major divisions--r_logtinkbooltr_logs Logarithmic subdivisions if trues--r_divs_tht	r_divs_this&Major Circular Division Line thicknesss--r_subdivs_thtr_subdivs_this&Minor Circular Division Line thicknesss--a_divsta_divsisAngle Divisionss
--a_divs_centta_divs_centisAngle Divisions at Centres--a_subdivst	a_subdivss(Angcular Subdivisions per Major divisions--a_subdivs_centta_subdivs_centsGAngular Subdivisions end 'n' major circular divisions before the centres--a_divs_tht	a_divs_ths%Major Angular Division Line thicknesss--a_subdivs_thta_subdivs_ths%Minor Angular Division Line thicknesss--c_dot_diat	c_dot_diag@sDiameter of Centre Dots
--a_labelsta_labelstdegsThe kind of labels to applys--a_label_sizeta_label_sizeis4The nominal pixel size of the circumferential labelss--a_label_outsetta_label_outsets/The radial outset of the circumferential labels(RtEffectt__init__tOptionParsert
add_optiontFalse(tself((s,/usr/share/inkscape/extensions/grid_polar.pyRL7s�
cCs�|jt|jj�d�|j_|jt|jj�d�|j_|jt|jj�d�|j_|jt|jj�d�|j_|jt|jj�d�|j_|jt|jj�d�|j_|jt|jj	�d�|j_	|jt|jj
�d�|j_
tt|j
�|j�}dt|d�dt|d�d}idt|jj�dt|jj�tjd	d
�6|d6}tjj|jd|�}|jj}d
t|jj}|jj|}x_td|jjd�D]D}t||dd|jjddt|�dt||�|�|jjr�x�td
|jj�D]_}	t||dt|	|jj�|dd|jjddt|�dt|	�|�q�Wqxqtd|jj�D]Z}	t|||	||jjdd|jjddt|�dt||�|�q�WqW|jj|jjkr�x�td|jj�D]N}tdd|t||�|t||�|jjdt|�|�q�Wn xetd|jj�D]N}tdd|t||�|t||�|jjdt|�|�q�Wd
t|jj}x�td|jj�D]�}t|t||td�|t||td�|t||td�|t||td�|jjdt|�|�qsW|jjdkr�x�td|jj�D]�}x�td|jj�D]�}	|||	||jjtd}
t||jj t|
�||jj t|
�|t|
�|t|
�|jjdt|�|�qEWq)Wn|jjdkrt|jjdddddd|�n|jj!dkr�||jj
}|jj	}d|}
x�td|jj�D]q}t"t||td�|t||td�||
dt|d|jj�|dt|�|�qkWndS(NR%s
translate(iRit)sGrid_Polar:Rs:ARR	t	transformtgiRtMajorDivCircles:RtMinorDivCircles:LogtRadialGridlineg@tRadialMinorGridlines#000000t	CentreDotRHg\��(\�?ihtLabel(#tunittouuRtoptionsR:R>R?RDRERFRIRJRtlisttview_centert
current_layerR7R@RRRRtpiRAtrangeRR=R;tlogR!tsintcosRBRCRGR-(RPR]ttt	g_attribstgridR:tdthetatrmaxtitjtangletlabel_radiust
label_sizetnumeral_size((s,/usr/share/inkscape/extensions/grid_polar.pyteffect}s|%%%%%%%%*7
 &%).+$+!52!$(
!(t__name__t
__module__RLRo(((s,/usr/share/inkscape/extensions/grid_polar.pyR.6s	Ft__main__(t__doc__RR
tsystmathtsimpletransformRRR!R-RKR.Rptetaffect(((s,/usr/share/inkscape/extensions/grid_polar.pyt<module>s
			�