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/interp_att_g.pyo
�
��Yc@s�dZddlZddlZddlZddlZddlZddlmZdejfd��YZ	e
dkr�e	�Zej�r�e
d�q�e
d�ndS(	s�
Copyright (C) 2009 Aurelio A. Heckert, aurium (a) gmail dot 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����N(tzSortt
InterpAttGcBs5eZd�Zd�Zd�Zd�Zd�ZRS(c
Cs�tjj|�|jjddddddddd	d
dd�|jjd
ddddddddd�|jjdddddddddd�|jjdddddddddd�|jjddddddddd	ddd�|jjdddddddd d	d!dd"�|jjd#d$dddddd%d	d&dd'�|jjd(dddd)dd*d	tdd+�|jjd,dddddd-dd.�dS(/Ns-as--atttactiontstorettypetstringtdesttatttdefaulttfillthelpsAttribute to be interpolated.s-os--att-othert	att_others#Other attribute (for a limited UI).s-ts--att-other-typetatt_other_typesThe other attribute type.s-ws--att-other-wheretatt_other_wheres-That is a tag attribute or a style attribute?s-ss--start-valt	start_vals#F00sInitial interpolation value.s-es	--end-valtend_vals#00FsEnd interpolation value.s-us--unittunittcolorsValues unit.s--zsorttinkbooltzsorts&use z-order instead of selection orders--tabttabs'The selected UI-tab when OK was pressed(tinkextEffectt__init__tOptionParsert
add_optiontTrue(tself((s./usr/share/inkscape/extensions/interp_att_g.pyRsJcCs�tj|jjdd�}tj|jjdd�}tjd|�r�tjd|�}tjd|�}t|d�|_	t|d�|_
t|d�|_t|d�|_t|d�|_
t|d�|_n}t|�dkr�t|d|dd	�|_	t|d|dd	�|_
t|d|dd	�|_t|d|dd	�|_t|d|dd	�|_
t|d|dd	�|_n�t|d|dd	�|_	t|d|dd	�|_
t|d
|dd	�|_t|d|dd	�|_t|d|dd	�|_
t|d
|dd	�|_|j|j	t|jd�|_|j
|j
t|jd�|_|j|jt|jd�|_|j	|_|j
|_|j|_dS(Nt#ts\s|,s[\s,]+iiiiiii(RtreplacetoptionsRRtretsearchtsplittinttR_initG_initB_initR_endtG_endtB_endtlentfloatttot_eltR_inctG_inctB_inctR_curtG_curtB_cur(Rtsvtev((s./usr/share/inkscape/extensions/interp_att_g.pytgetColorValuesFs<!$$$cCs�|jj}|jj}|jr_|jdkr_|j||j�}|j||j�}n||_|_||_||t|j	d�|_
dS(Ntnonei(RRRt
inte_att_typetunittouutval_curtval_initval_endR+R,tval_inc(RR3R4((s./usr/share/inkscape/extensions/interp_att_g.pytgetNumberValuesjs	cCs"d|_d|_t|j�dkr+tSt|j�dkr�|jjrpt|j	j
�|jj��}n|jj}t
|�|_x�|D]H}d|}|j	j|dtj�d|j|j<|jd7_q�Wn=|j|jjd|_x |jD]}|jd7_qWdS(Niis
//*[@id="%s"]t
namespaces(R,tNonet
collectionR*tselectedtFalseRRRtdocumenttgetroottkeystidstlisttxpathRtNSS(Rt
sorted_idstitpath((s./usr/share/inkscape/extensions/interp_att_g.pytgetTotElementsts 		$

)cCs |jjdkrB|jj|_|jj|_|jj|_n|jj|_|jdkrud|_d|_n�|jdkr�d|_d|_n�|jdkr�d|_d|_n�|jdkr�d|_d|_nl|jd	krd|_d|_nH|jd
kr)d|_d|_n$|jd
krMd|_d|_n|j�|jdkrs|j	�n
|j
�|jdkr�t
jtd��tSxv|jD]k}|jdkr"dttt|j���dttt|j���dttt|j���d}n*|jdkr=|j}nt|j�}|jdkr�|jd�}d|jd}tj||�r�tj|d|jdt|�d|�}n|d|jdt|�7}|jd|�n�|jdkr�|jd�}|dkr#d}n|jdkrIdt|�d}nA|jd	krodt|�d}n|jdt|�d}|jd|d|�n|j|jt|��|jdkr|j|j7_|j|j7_|j|j7_q�|j|j 7_q�Wt!S(NtothertwidthR+ttagtheighttscalet	transformstrans-xstrans-yR	Rtstyletopacitys$There is no selection to interpolatesrgb(t,t)s(^|;)s:[^;]*(;|$)s\1t:s\2t;Rs
translate(s,0)stranslate(0,t(t ("RRRtinte_attRR7R
twhereRMR5R=R@R?Rterrormsgt_RBtstrR#troundR0R1R2R9tgetR R!tsubtsetR-R.R/R<R(Rtnodetvaltstre_findtt((s./usr/share/inkscape/extensions/interp_att_g.pyteffect�s~							


`1	(t__name__t
__module__RR5R=RMRj(((s./usr/share/inkscape/extensions/interp_att_g.pyRs
	'	$	
	t__main__ii(t__doc__tmathR RRtsimplestyletpathmodifierRRRRktetaffecttexit(((s./usr/share/inkscape/extensions/interp_att_g.pyt<module>s�