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

5�a��@sXddlZddlmZddlmZddlmZGdd�dej�Z	e
dkr*e	���dSdS)�N)�DirectedLineSegment)�
inkex_gettext)�truedivc@sDeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Ze	dd
��Z
dS)�Envelopez.Distort a path/group of paths to a second pathcCs�t|jj�dkrt�td���|jj\}}t|tjtjf�rQt|tj�r=|�	|�
����}|j�
|�����}|�|�}nt|tj�rJt�td���t�td���t�td���|�|||�dS)N�z!You must select two objects only.zMThe second selected object is a group, not a path.
Try using Object->Ungroup.zWThe second selected object is not a path.
Try using the procedure Path->Object to Path.zfThe first selected object is neither a path nor a group.
Try using the procedure Path->Object to Path.)�len�svg�	selection�inkex�AbortExtension�_�
isinstance�PathElement�Group�bounding_box�	getparent�composed_transform�path�	transform�to_superpath�envelope_box_from_path�process_object)�self�obj�envelope�bboxr�tbox�r�//usr/share/inkscape/extensions/path_envelope.py�effectszEnvelope.effectcCs�t|�dkst|d�dkrt�td���dd�|D�ddd�}t|d|d�t|d|d�t|d|d�t|d|d�g}d	d�|D�}d
|d�|d�kro|d�|d�kro|d�|d�kryn|St�td���|S)N�r�z>Second selected path is too short. Must be four or more nodes.cSsg|]	}dd�|D��qS)cSs$g|]}|dd|ddf�qS)r rr)�.0�csprrr�
<listcomp>8s$z>Envelope.envelope_box_from_path.<locals>.<listcomp>.<listcomp>r)r"�subsrrrr$8sz3Envelope.envelope_box_from_path.<locals>.<listcomp>r�cSsg|]}|j�qSr)�vector)r"�segmentrrrr$@s�z?The points for the selected envelope must not all be in a line.)rr
rrr�cross)r�
envelope_path�trafor�vectsrrrr5s�J�zEnvelope.envelope_box_from_pathcCs@t|tj�r|�|||�dSt|tj�r|�|||�dSdS)N)r
r
r�process_pathr�
process_group)rrrrrrrrEs
�zEnvelope.process_objectcCs|D]	}|�|||�qdS)z6Go through all groups to process all paths inside themN)r)r�grouprr�noderrrr/Ks�zEnvelope.process_groupcCs�|j���|�����}|D]1}|D],}|j||g|d�R�|d<|j||g|d�R�|d<|j||g|d�R�|d<qq|���|���|_dS)Nrr r)r�to_absoluterrr�transform_point�to_path)r�elementrr�pointsr%r#rrrr.Ps�zEnvelope.process_pathcCs||f|j}tt||j|jf�\}}t|d�|�|d�|��}t|d�|�|d�|��}|j�|j�}	|	dkrs|j	dkrD|j
S|j	dkrL|j
S|j�|j�dkrd|j
|j
j	dkra|j
S|jS|j
|jj	dkrp|j
S|jS|j
|j
�|j�|	}
|�|
�S)z0Transform algorithm thanks to Jose Hevia (freon)rrr&r r)g:�0�yE>)
�minimum�mapr�width�heightr�point_at_ratior'r*�length�start�dot�end)rr�x�yr'�xratio�yratio�horz�vert�denom�intersect_ratiorrrr3^s&


zEnvelope.transform_pointN)�__name__�
__module__�__qualname__�__doc__rrrr/r.�staticmethodr3rrrrrsr�__main__)r
�inkex.transformsr�inkex.localizationrr�operatorr�EffectExtensionrrH�runrrrr�<module>sa�

Youez - 2016 - github.com/yon3zu
LinuXploit