| 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
0�a,! � @ sb d Z ddlZddlmZmZmZ ddlmZmZ ddlm Z G dd� dej
�ZG dd � d e�ZdS )
a{
This code defines a basic class (PathModifier) of effects whose purpose is
to somehow deform given objects: one common tasks for all such effect is to
convert shapes, groups, clones to paths. The class has several functions to
make this (more or less!) easy.
As an example, a second class (Diffeo) is derived from it,
to implement deformations of the form X=f(x,y), Y=g(x,y)...
� N)�PathElement�Group�Use)�
pointdistance�beziersplitatt)�zSortc @ s~ e Zd ZdZddd�Zddd�Zddd�Zd d
� Zedd� �Z ed
d� �Z
edd� �Zedd� �Zeddd��Z
ddd�ZdS )�PathModifierzSelect list manipulationTc C s� t |�� �D ]7\}}t|tj�r=|j}|D ]}|r||j |_|�| �|�d�|i�� q|r8|�d�r8|j d= |�
|� q|S )N�id� transform)�list�items�
isinstance�inkexr r
�update�
expand_groups�get�attrib�pop)�self�elements�transferTransform�node_id�node�mat�child� r �./usr/share/inkscape/extensions/pathmodifier.pyr ( s
�zPathModifier.expand_groupsc C s~ t |�� �D ]6\}}t|t�r| �||� | �|||� qt|t�r<|�� }|�|� |� d�}|�
| �||i||�� q|S )Nr )r r r
r r �
expand_clonesr �unlinkr r r )r r r �replacer r �newnode�newidr r r r 6 s
�zPathModifier.expand_clonesc C sL t |�� �D ]}|�� }|r|�|� |�d|�d�� |||�d�<