| 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 : |
o
5�a� � @ sX d dl Z d dlmZ d dlmZ d dlmZ G dd� de j�Z e
dkr*e � �� dS dS )� N)�DirectedLineSegment)�
inkex_gettext)�truedivc @ sD e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Ze dd
� �Z
dS )�Envelopez.Distort a path/group of paths to a second pathc C s� t | jj�dkrt�td���| jj\}}t|tjtjf�rQt|tj�r=|� |�
� �� �}|j�
|�� ��� }| �|�}nt|tj�rJt�td���t�td���t�td���| �|||� d S )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�effect s zEnvelope.effectc C s� t |�dk st |d �dk rt�td���dd� |D �d d d� }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 |S t�td���|S )N� r � z>Second selected path is too short. Must be four or more nodes.c S s g | ] }d d� |D ��qS )c S s$ g | ]}|d d |d d f�qS )r r r )�.0�cspr r r �
<listcomp>8 s $ z>Envelope.envelope_box_from_path.<locals>.<listcomp>.<listcomp>r )r"