HEX
Server: Apache
System: Linux opal14.opalstack.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User: curbgloabal_opal (1234)
PHP: 8.1.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/share/inkscape/extensions/convert2dashes.pyo
�
��Yc@s�dZddlZddlZddlZddlZdd�Zdd�Zddd�Zdd�Zd	ej	fd
��YZ
edkr�e
�Zej
�ndS(s�
This extension converts a path into a dashed line using 'stroke-dasharray'
It is a modification of the file addnodes.py

Copyright (C) 2005,2007 Aaron Spike, aaron@ekips.org
Copyright (C) 2009 Alvin Penner, penner@vaxxine.com

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
i����Ng�?cCs:|\}}|\}}||||||||gS(N((t.0t.1tttx1ty1tx2ty2((s0/usr/share/inkscape/extensions/convert2dashes.pyttpointsc	Cs�t|d|d|�}t|d|d|�}t|d|d|�}t|||�}t|||�}t|||�}|d|d|g|||g||d|dggS(Niii(R(	tsp1tsp2Rtm1tm2tm3tm4tm5tm((s0/usr/share/inkscape/extensions/convert2dashes.pytcspbezsplitsg����MbP?cCsK|d|d|d|df}tj|||�}t|||�S(Niii(tbezmisctbeziertatlengthR(RR	tlt	tolerancetbezR((s0/usr/share/inkscape/extensions/convert2dashes.pytcspbezsplitatlength's&cCs6|d|d|d|df}tj||�S(Niii(Rtbezierlength(RR	RR((s0/usr/share/inkscape/extensions/convert2dashes.pytcspseglength+s&tSplitItcBs#eZd�Zd�Zd�ZRS(cCstjj|�g|_dS(N(tinkextEffectt__init__t
not_converted(tself((s0/usr/share/inkscape/extensions/convert2dashes.pyR0scCsxx*|jj�D]\}}|j|�qWt|j�rttjtd�jt|j���tj	|j�ndS(Ns*Total number of objects not converted: {}
(
tselectedt	iteritemstconvert2dashtlenRRterrormsgt_tformattdebug(Rtitnode((s0/usr/share/inkscape/extensions/convert2dashes.pyteffect4s
%cCsH|jtjdd�kr<x&|D]}|j|�q"Wn|jtjdd�kr+g}d}tj|jd��}|jd�r�|djd�dkr�g|dj	d�D]}t
|�^q�}q�n|jd�r�|d}n|rDtj|jd	��}g}x�|D]�}	d}
|d}t
|�}x8||krx||}|
d
t
|�}
||
}qAW|j|	dg�d
}x|t
|	�kr�||}t|dd|	|�}x�||krot|dd|	|||�\|dd<}
|	|<|
dr2|j|
g�n|dj|
�||}|
d
t
|�}
||
}q�W|
dr�|j|	|g�n|dj|	|�|d
7}q�WqW|jd	tj|��|d=|jdtj|��|jtjd
d��r(|jtjd
d�=q(qDn|jj|jd��dS(Ntgtsvgtpathitstylesstroke-dasharrayt,sstroke-dashoffsettdii����ittypetsodipoditid(ttagRtaddNSR!tsimplestylet
parseStyletgetthas_keytfindtsplittfloattcubicsuperpatht	parsePathR"tappendRRtsett
formatPathtformatStyletattribR(RR(tchildtdashestoffsetR-tdashtptnewtsubtidashtlengthR'tnext((s0/usr/share/inkscape/extensions/convert2dashes.pyR!<s\
2




7


(t__name__t
__module__RR)R!(((s0/usr/share/inkscape/extensions/convert2dashes.pyR/s		t__main__(t__doc__RR<RR5RRRRRRRMtetaffect(((s0/usr/share/inkscape/extensions/convert2dashes.pyt<module>sA