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_cartesian.pyc
�
��Yc@s�dZddlZddlZddlZddlTddlmZd�Zd�Zdej	fd��YZ
ed	kr�e
�Zej
�ndS(
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*(tcomputePointInNodec	Cs�idd6t|�d6dd6}itj|�d6|tjdd�6d	t|�d
t|�dt|�d
t|�d6}tjj|tjd
d�|�dS(Ns#000000tstrokesstroke-widthtnonetfilltstyletlabeltinkscapesM t,s L tdtpathtsvg(tstrtsimplestyletformatStyletinkextaddNStetreet
SubElement(	tx1ty1tx2ty2twidthtnametparentRtline_attribs((s0/usr/share/inkscape/extensions/grid_cartesian.pyt
draw_SVG_lines
!>c
Cs�idd6t|�d6|d6}itj|�d6|tjdd�6t|�d6t|�d	6t|�d
6t|�d6}	tjj|tjdd
�|	�dS(Ns#000000Rsstroke-widthRRRRtxtyRtheighttrectR(RR
RRRRR(
RRtwthRRRRRtrect_attribs((s0/usr/share/inkscape/extensions/grid_cartesian.pyt
draw_SVG_rect%s
!7t
Grid_PolarcBseZd�Zd�ZRS(cCs�tjj|�|jjddddddddd	�|jjd
dddddddd
dd�|jjddddddddddd�|jjddddddddddd�|jjddddddddtdd�|jjddddddddd
dd�|jjd dddddd!dd"dd#�|jjd$dddddd%dddd&�|jjd'dddddd(dd)dd*�|jjd+dddddd,dd)dd-�|jjd.dddddd/dd0dd1�|jjd2dddddd3dddd4�|jjd5dddddd6dddd7�|jjd8dddddd9dtdd:�|jjd;dddddd<dd
dd=�|jjd>dddddd?dd"dd@�|jjdAddddddBddddC�|jjdDddddddEdd)ddF�|jjdGddddddHdd)ddI�|jjdJddddddKddLddM�dS(NNs--tabtactiontstorettypetstringtdestttabtdefaulttx_tabs--x_divstinttx_divsithelpsMajor X Divisionss--dxtfloattdxgY@sMajor X divison Spacings--x_subdivst	x_subdivsis!Subdivisions per Major X divisions--x_logtinkbooltx_logs"Logarithmic x subdivisions if trues--x_subsubdivstx_subsubdivss$Subsubdivisions per Minor X divisions
--x_half_freqtx_half_freqis8Halve Subsubdiv. Frequency after 'n' Subdivs. (log only)s--x_divs_tht	x_divs_thsMajor X Division Line thicknesss--x_subdivs_thtx_subdivs_thisMinor X Division Line thicknesss--x_subsubdivs_thtx_subsubdivs_ths"Subminor X Division Line thicknesss--y_divsty_divsisMajor Y Divisionss--dytdysMajor Gridline Increments--y_subdivst	y_subdivss$Minor Divisions per Major Y divisions--y_logty_logs"Logarithmic y subdivisions if trues--y_subsubdivsty_subsubdivss$Subsubdivisions per Minor Y divisions
--y_half_freqty_half_freqs:Halve Y Subsubdiv. Frequency after 'n' Subdivs. (log only)s--y_divs_tht	y_divs_thsMajor Y Division Line thicknesss--y_subdivs_thty_subdivs_thsMinor Y Division Line thicknesss--y_subsubdivs_thty_subsubdivs_ths"Subminor Y Division Line thicknesss--border_tht	border_thisBorder Line thickness(RtEffectt__init__tOptionParsert
add_optiontFalse(tself((s0/usr/share/inkscape/extensions/grid_cartesian.pyRE-s�
cCs�
|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_
|jt|jj�d�|j_|jj|jj}|jj|jj
}tt|j�|j�}dt|d|d�dt|d|d�d}idt|jj
�d	t|jj�tjd
d�6|d6}tjj|jd
|�}idtjd
d�6}tjj|d
|�}idtjd
d�6}tjj|d
|�}|jjdkr�idtjd
d�6}tjj|d
|�}	n|jjdkridtjd
d�6}tjj|d
|�}
n|jjdkraidtjd
d�6}tjj|d
|�}n|jjdkr�idtjd
d�6}tjj|d
|�}ntdd|||jjdd|�|jj}
|jj}xOtd|jj
�D]8}|dkrOt|jj|d|jj|||jjdt|�|�n|jjr�x�td|
�D]�}|dkr�t|jj|t||
�d|jj|t||
�||jjdt|�dt|�|	�nxtd|�D]�}||jjks |ddkr�|ddkrO||jj krO|d}n|}t|jj|t||t!|�|
�d|jj|t||t!|�|
�||jjdt|�dt|�dt|�|
�q�q�WqkWq�x:td|
�D])}|dkr�t|jj||t!|
�d|jj||t!|
�||jjdt|�dt|�|	�nx�td|�D]�}t|jj||||t!|
�|d|jj||||t!|
�|||jjdt|�dt|�dt|�|
�q�WqWq�W|jj}
|jj}xetd|jj�D]N}|dkr�td|jj|||jj||jj	dt|�|�n|jj"ro	x�td|
�D]�}|dkrZtd|jj|dt||
�||jj|dt||
�|jj
dt|�dt|�|�nxtd|�D]�}||jj ks�|ddkrj|ddkr�||jj kr�|d}n|}td|jj|dt||t!|�|
�||jj|dt||t!|�|
�|jjdt|�dt|�dt|�|�qjqjWq�Wqdx@td|jj�D])}|dkr
td|jj||t!|
�||jj||t!|
�|jj
dt|�dt|�|�nx�td|�D]�}td|jj||||t!|
�|||jj||||t!|
�||jjdt|�dt|�dt|�|�q
Wq�	WqdWdS(Ntpxs
translate(ig@Rit)sGrid_Polar:Xs:YRRt	transformtgtMajorXGridlinestMajorYGridlinestMinorXGridlinestSubMinorXGridlinestMinorYGridlinestSubMinorYGridlinesRtBordert	MajorXDivt	MinorXDivt:itSubminorXDivt	MajorYDivt	MinorXYiv(#tunittouuRtoptionsRCR1R7R8R9R;R@RARBR:R.Rtlisttview_centert
current_layerRRRRR2R5R<R>R#trangeRR4tlogR6R?R0R=(RItymaxtxmaxR^ttt	g_attribstgridtmajglxtmajglytminglxtmminglxtminglytmminglytsdtssdtitjtktssd2((s0/usr/share/inkscape/extensions/grid_cartesian.pyteffect�s�%%%%%%%%%:7

	 	%""
.+G!	%-*	<	$!	%""
2/	>!	%-*	(t__name__t
__module__RERs(((s0/usr/share/inkscape/extensions/grid_cartesian.pyR$,s	St__main__(t__doc__RR
tsystmathtsimpletransformRRR#RDR$Rttetaffect(((s0/usr/share/inkscape/extensions/grid_cartesian.pyt<module>s
		�