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/split.pyo
�
��Yc@sBdZddlZdejfd��YZe�Zej�dS(s�
Copyright (C) 2009 Karlisson Bezerra, contato@nerdson.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����NtSplitcBs5eZd�Zd�Zd�Zd�Zd�ZRS(c
Cs�tjj|�|jjddddddddd	d
dd�|jjd
dddddddd	ddd�|jjddddddddd�dS(Ns-ss--splittypetactiontstorettypetstringtdestt
split_typetdefaulttwordthelps
type of splits-ps
--preservetinkbooltpreservetTruesPreserve originals--tabttabs'The selected UI-tab when OK was pressed(tinkextEffectt__init__tOptionParsert
add_option(tself((s'/usr/share/inkscape/extensions/split.pyRscCs�g}d}x�|D]}}|jtjdd�kpL|jtjdd�ks�|jtjdd�krtjd�Pq�qntjjtjdd�|j�}|jtjdd�kry-d	d
lm}||j	d��d}Wn
d
}nX|j
|�}|j	d�}	|jd|	�d}
|
jtjdd�kr�|jd|
j	d��|jdt
t|
j	d��||��|d7}ntjd�Ptjjtjdd��}|jtjdd�d�|j|_|j|�nd	dlm}|j	d�p/|j	d�}
|j	d�pM|j	d�}|jd|
�|jd|�|j||��|j|�qW|S(sReturns a list of linesitflowParatsvgttspanttextPathsGThis type of text element isn't supported. First remove text from path.ttexttflowRooti����(t
parseStyletstyles	font-sizet12pxtids'/svg:svg//*[@id="%s"]/svg:flowRegion[1]itrecttxtys=This type of text element isn't supported. First unflow text.troletsodipoditline(tcopy(ttagRtaddNStdebugtetreetElementtattribtsimplestyleRtgettunittouutxpathSingletsettstrtfloatRtappendR$(RtnodetlinestcounttnRRtfontsizetfsRtflowrefRR$RR ((s'/usr/share/inkscape/extensions/split.pytsplit_lines&sH
6
$
-

cs�g}�fd��|j|�}|s.|Sxw|D]o}t|jd��}|jd�}y-ddlm}||jd��d}Wn
d}nX|j|�}	d	j�|��j�}
d
}x�|
D]�}tj	j
tjdd��}
||
_tj	j
tjd
d�|j
�}|
jtjdd�d�|||	}t|�}|jdt|��|jdt|��|j|
�|j|�q�Wq5W|S(sReturns a list of wordscsfg}|jr"|j|j�nx=|D]5}|j�|��|jr)|j|j�q)q)W|S(N(RR2textendttail(telemtwordsR6(t	plain_str(s'/usr/share/inkscape/extensions/split.pyR?es	
	RR i����(RRs	font-sizeRtiRRRR!R"R#(R:R1R,R+RR-tjointsplitRR(R)R&RR*R/tlenR0R2(RR3R>R4R#RR RR7R8t
words_listtprev_lenRRR((R?s'/usr/share/inkscape/extensions/split.pytsplit_words_s8


	$
c
CsVg}|j|�}|s|Sx0|D](}t|jd��}|jd�}y,ddl}|j|jd��d}Wn
d}nX|j|�}	x�|djD]�}
tjj	tj
d	d
��}|
|_tjj	tj
dd
�|j�}|jdt
|��|jdt
|��||	7}|j|�|j|�q�Wq&W|S(sReturns a list of lettersRR i����NRs	font-sizeRiRRR(RFR1R,R+RR-RRR(R)R&R*R/R0R2(
RR3tlettersR>RRR R+R7R8tletterRR((s'/usr/share/inkscape/extensions/split.pyt
split_letters�s.
 
	$

cCs*|jj}|jj}x|jj�D]�\}}|jtjdd�kpg|jtjdd�ks{tjd�Pq(|dkr�|j	|�}n<|dkr�|j
|�}n|dkr�|j|�}nx!|D]}|j�j
|�q�W|r(|r(|j�}|j|�q(q(WdS(	sApplies the effectRRRs!Please select only text elements.R#RRHN(toptionsRRtselectedt	iteritemsR%RR&R'R:RFRIt	getparentR2tremove(RRRRR3tnodesR6tparent((s'/usr/share/inkscape/extensions/split.pyteffect�s"6


(t__name__t
__module__RR:RFRIRQ(((s'/usr/share/inkscape/extensions/split.pyRs
		9	:	%(t__doc__RRRtbtaffect(((s'/usr/share/inkscape/extensions/split.pyt<module>s�