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/hershey.pyo
�
��Yc@s�dZddlZddlZddlZddlmZeZd�Zdej	fd��YZ
edkr�e
�Zej
�ndS(s1
Hershey Text - renders a line of text using "Hershey" fonts for plotters

Copyright 2011, Windell H. Oskay, www.evilmadscientist.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(tcomputePointInNodecCs�idd6dd6}||}|j�}|t|d�}||jd�}dt|�dt|�d	}	itj|�d
6|d6|	d6}
tjj|tj	d
d�|
�|t|d�S(Ns#000000tstroketnonetfillitMs
translate(t,t)tstyletdt	transformtpathtsvgi(
tsplittinttfindtstrtsimplestyletformatStyletinkextetreet
SubElementtaddNS(tchartfacetoffsett
vertoffsettparentRt
pathStringtsplitStringtmidpointttransttext_attribs((s)/usr/share/inkscape/extensions/hershey.pyt
draw_svg_texts
"$"tHersheycBseZd�Zd�ZRS(cCs�tjj|�|jjddddddddd	d
d�|jjddddddd
ddd
d�|jjdddddddddd
d�|jjdddddddddd
d�dS(Ns--tabtactiontstorettypetstringtdestttabtdefaulttsplashthelps%The active tab when Apply was presseds--textttextsHershey Text for InkscapesThe input text to renders--actiontrenders(The active option when Apply was presseds
--fontfacetfontfacetrowmanss-The selected font face when Apply was pressed(RtEffectt__init__tOptionParsert
add_option(tself((s)/usr/share/inkscape/extensions/hershey.pyR0*s"c	Csridtjdd�6}tjj|jd|�}|jd�}tdt|jj	��}t
j}d}d}|jjd	krg|jj
D]}t|�d
^q�}	x4|	D]G}|dks�|dkr�|d|7}q�t|||d|�}q�Wn�d}
x�tdd
�D]�}d}|d|d}x�tdd
�D]{}|d
|}
|
dkst|
dkr�|d|7}qHt|
||||�}t|
||||�}|d|7}qHW||
kr|}
qqW|
}tt|j�|j�}dt|d||d�dt|d�d}|dkr^|dt|�d7}n|jd|�dS(NsHershey Texttlabeltinkscapetgt1pxshersheydata.iiR,i i_ii
iiCis
translate(RiRs scale(R	(RRRRt
current_layertunittouutevalRtoptionsR-thersheydatatfuturalR"R+tordR trangeRtlisttview_centertset(R3t	g_attribsR6tscaletfontt	clearfonttwtspacingtqt
letterValstwmaxtptvtrRAtt((s)/usr/share/inkscape/extensions/hershey.pyteffect=s@	)

6(t__name__t
__module__R0RP(((s)/usr/share/inkscape/extensions/hershey.pyR!)s	t__main__(t__doc__R<RRtsimpletransformRtFalsetDebugR R/R!RQtetaffect(((s)/usr/share/inkscape/extensions/hershey.pyt<module>s	E