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/fractalize.pyo
�
��Yc@s~dZddlZddlZddlZddlZd�Zdejfd��YZedkrze�Z	e	j
�ndS(s�
Copyright (C) 2005 Carsten Goetze c.goetze@tu-bs.de

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����NcCs�||}||}||d}||d}tj||||�}	|	dkro||	}
||	}nd}
d}tj|	d||	d|�}|
|}
||}||
}
||}|
|gS(s. Calculate the vector from (x1,y1) to (x2,y2) iii(tmathtsqrttrandomtuniform(tx1ty1tx2ty2t
smoothnesstx3ty3thxthytlengthtnxtnytrtxty((s,/usr/share/inkscape/extensions/fractalize.pytcalculateSubdivisions 


#



tPathFractalizecBs#eZd�Zd�Zd�ZRS(c
Csvtjj|�|jjddddddddd	d
dd�|jjd
dddddddd	ddd�dS(Ns-ss	--subdivstactiontstorettypetinttdesttsubdivstdefaultt6thelpsNumber of subdivisonss-fs--smoothtfloattsmooths4.0sSmoothness of the subdivision(tinkextEffectt__init__tOptionParsert
add_option(tself((s,/usr/share/inkscape/extensions/fractalize.pyR"/sc

CsMxF|jj�D]5\}}|jtjdd�kr|jd�}tj|�}g}d}x�|D]�\}}|dkrh|dkr�|d}	|d}
|jd|dg�d	}q%|d}|d}|j	||	|
|||j
j|j
j�|}	|}
|jd
|dg�qhqhW|j
dtj|��qqWdS(NtpathtsvgtditZi����i����tMitL(tselectedt	iteritemsttagR taddNStgett
simplepatht	parsePathtappendt
fractalizetoptionsRRtsett
formatPath(
R%tidtnodeR(tptatfirsttcmdtparamsRRRR((s,/usr/share/inkscape/extensions/fractalize.pyteffect9s(

	

+c	Cs�t|||||�}|dkr�|j||||d|d|d|�|jd|g�|j||d|d|||d|�ndS(Nii����i����iR+(RR4R3(	R%R;RRRRtstftsubdivPoint((s,/usr/share/inkscape/extensions/fractalize.pyR4Rs
+(t__name__t
__module__R"R?R4(((s,/usr/share/inkscape/extensions/fractalize.pyR.s	
	t__main__(t__doc__RRR R1RR!RRCtetaffect(((s,/usr/share/inkscape/extensions/fractalize.pyt<module>s0	.