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/ink2canvas.pyo
�
��Yc@sydZddlZddlmZddljZejZdejfd��YZ	e
dkrue	�Zej�ndS(s�
Copyright (C) 2011 Karlisson Bezerra <contact@hacktoon.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(tCanvast
Ink2CanvascBsGeZd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCstjj|�d|_dS(N(tinkextEffectt__init__tNonetcanvas(tself((s,/usr/share/inkscape/extensions/ink2canvas.pyRscCs)ddl}|jj|jj��dS(Ni����(tsyststdouttwriteRtoutput(RR((s,/usr/share/inkscape/extensions/ink2canvas.pyR scCs|jjd�dS(Nt}i(ttagtsplit(Rtnode((s,/usr/share/inkscape/extensions/ink2canvas.pytget_tag_name$scCs�|j�}|jd|�}|jtjdd��}|jd|d�}g}x$|D]}|j|jd��q^W|jd�r�tj||�Stj||�SdS(Ns
//*[@id='%s']threftxlinks//svg:linearGradient[@id='%s']itstyletr(	tget_gradient_hreftxpathSingletgetRtaddNStappendtsvgtRadialGradientDeftLinearGradientDef(Rtelemturl_idtgradientt	url_stopstgstopstcolorststop((s,/usr/share/inkscape/extensions/ink2canvas.pytget_gradient_defs(s
cCs|j�rndS(N(thas_clip(RR((s,/usr/share/inkscape/extensions/ink2canvas.pyt
get_clip_defs7scCs�x�|D]�}|jtjjkr(qn|j|�}|j�}tt|�sXqnd}d}t	t|�|||j
�}|j�r�|j|�}n|j
|�|j�|j|�|j�qWdS(N(R
RtetreetCommentRt
capitalizethasattrRRtgetattrRthas_gradientR$tstarttdrawt	walk_treetend(RtrootRR
t
class_nameRtclipR((s,/usr/share/inkscape/extensions/ink2canvas.pyR/<s 



cCse|jj�}|j|jd��}|j|jd��}t|||�|_|j|�dS(sApplies the effecttwidththeightN(tdocumenttgetroottunittouuRRRR/(Rtsvg_rootR4R5((s,/usr/share/inkscape/extensions/ink2canvas.pyteffectPs
(	t__name__t
__module__RRRR$R&R/R:(((s,/usr/share/inkscape/extensions/ink2canvas.pyRs						t__main__(
t__doc__Rtink2canvas.canvasRtink2canvas.svgRtdebugtlogRRR;tinktaffect(((s,/usr/share/inkscape/extensions/ink2canvas.pyt<module>s	>