403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.60
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/inkscape/extensions/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/inkscape/extensions/__pycache__/image_attributes.cpython-310.pyc
o

5�aU�@sDdZddlZddlmZGdd�dej�Zedkr e���dSdS)z�
image_attributes.py - adjust image attributes which don't have global
GUI options yet

Tool for Inkscape 0.91 to adjust rendering of drawings with linked
or embedded bitmap images created with older versions of Inkscape
or third-party applications.
�N)�Imagec@speZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)�ImageAttributeszSet attributes in imagescCs|j��dS�N)�options�tab_main��self�r	�2/usr/share/inkscape/extensions/image_attributes.py�effect"szImageAttributes.effectcCs�|jd|��|jd�|jdtjdd�|jdtjdd�|jddd	d
�|jddd
d
�|jd|�d�ddd�|jdddd
�|jd|�d�ddd�dS)Nz
--tab_main)�type�defaultz
--fix_scalingTz--fix_renderingFz--aspect_ratio�nonez)Value for attribute 'preserveAspectRatio')r
�helpz
--aspect_clip�unsetzoptional 'meetOrSlice' valuez--aspect_ratio_scope�change�
selected_onlyz,When to edit 'preserveAspectRatio' attribute)rr
rz--image_renderingz%Value for attribute 'image-rendering'z--image_rendering_scopez(When to edit 'image-rendering' attribute)�add_argument�
arg_method�method_tab_basic�inkex�Boolean)r�parsr	r	r
�
add_arguments%s$����
�zImageAttributes.add_argumentscCs�|��D]d\}}|dkr#|dkr|�|t|��q|�|�r"|j|=q|dkrgttj�|�d���}||vrM|dkrC|�|t|��q|�|�rL|j|=q|dkrXt|�||<n||=|�dtt�|���q	qdS)N�preserveAspectRatior�image-rendering�style)	�items�set�str�get�attrib�dictr�Style�	parse_str)r�node�	attribute�key�value�
node_styler	r	r
�change_attribute4s*
�
��z ImageAttributes.change_attributecCs |�d�D]}|�||�qdS)Nzdescendant-or-self::svg:image)�xpathr*)rr%r&�imgr	r	r
�change_all_imagesPs�z!ImageAttributes.change_all_imagescCs(|��D]
}t|t�r|�||�qdSr)�values�
isinstancerr*�r�selectedr&r%r	r	r
�change_selected_onlyTs

��z$ImageAttributes.change_selected_onlycCs|��D]}|�||�qdSr)r.r-r0r	r	r
�change_in_selectionYs�z#ImageAttributes.change_in_selectioncC�|�|j��|�dSr)r-�document�getroot�rr1r&r	r	r
�change_in_document]�z"ImageAttributes.change_in_documentcCs"|��D]
}|�|��|�qdSr)r.r*�	getparentr0r	r	r
�change_on_parent_group`s�z&ImageAttributes.change_on_parent_groupcCr4r)r*r5r6r7r	r	r
�change_on_root_onlydr9z#ImageAttributes.change_on_root_onlycCs2|�|jj|jjrdnd|jjrdndd��dS)z8Render all bitmap images like in older Inskcape versionsrr�
optimizeSpeed)rrN)r8�svgr1r�fix_scaling�
fix_renderingrr	r	r
rgs
�z ImageAttributes.method_tab_basiccCsD|jjg}|jjdkr|�|jj�|j�|jjdd�|�i�dS)zImage Aspect Ratiorr� N)r�aspect_ratio�aspect_clip�append�aspect_ratio_scoper>r1�join)r�attr_valr	r	r
�method_tab_aspect_rations
�z'ImageAttributes.method_tab_aspect_ratiocCs|j�|jjd|jji�dS)zImage Rendering QualityrN)r�image_rendering_scoper>r1�image_renderingrr	r	r
�method_tab_image_renderingvs
�z*ImageAttributes.method_tab_image_renderingN)�__name__�
__module__�__qualname__�__doc__rrr*r-r2r3r8r;r<rrHrKr	r	r	r
r sr�__main__)rOrr�EffectExtensionrrL�runr	r	r	r
�<module>s	[�

Youez - 2016 - github.com/yon3zu
LinuXploit