| 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 : |
o
0�a� � @ sv d Z ddlZddlmZ ddlZddlmZ ddlmZm Z ddl
mZ G dd� deej
�Zed kr9e� �� dS dS )
z>
Export to Gimp's XCF file format including Grids and Guides.
� N)�OrderedDict)�TempDirMixin)�
take_snapshot�call)�
inkex_gettextc @ s@ e Zd ZdZdZdd� Zdd� Zdd� Zed d
� �Z dd� Z
d
S )�GimpXcfz�
Provide a quick and dirty way of using gimp to output an xcf from Inkscape.
Both Inkscape and Gimp must be installed for this extension to work.
z gimp-out-c C sb |j ddd� |j ddtjdd� |j dd tjd
d� |j ddtjd
d� |j ddtddd� d S )Nz--tab�tab)�destz-dz--guideszSave the Guides in the XCF)�type�helpz-rz--gridzSave the Grid with the .XCF�-bz--backgroundzAdd background colorz-iz--dpi� X@zFile resolution)r
�defaultr )�add_argument�inkex�Boolean�float)�self�pars� r �*/usr/share/inkscape/extensions/gimp_xcf.py�
add_arguments* s
zGimpXcf.add_argumentsc C s� g }g }| j j�� D ];}|jr)d|jj k r| j jk r(n q
|�t|jj�� q
|j rEd|jj
k r:| j jk rEn q
|�t|jj
�� q
dd�|�fdd�|�ffS )z5Generate a list of horzontal and vertical only guidesr �h� �v)
�svg� namedview�
get_guides�
is_horizontal�point�y�height�append�str�is_vertical�x�width�join)r �horz_guides�vert_guides�guider r r r 1 s � �zGimpXcf.get_guidesc
c s� � | j j| jjd }d}| j �|�rP| j �|�}dD ]6\}}}d|i}dD ]}t|�|| |��} | j �| d�| } t t
t| ���||<