File: //usr/share/inkscape/extensions/draw_from_triangle.pyo
�
��Yc @ s% d Z d d l Z d d l Td d l Z d d l Z d d l Z d � Z d � Z d � Z d � Z d � Z
d � Z d
� Z d � Z
d � Z d
� Z d � Z d � Z d � Z d � Z d � Z d � Z d e f d � � YZ d e j f d � � YZ e d k r!e � Z e j � n d S( sb
Copyright (C) 2007 John Beard john.j.beard@gmail.com
##This extension allows you to draw various triangle constructions
##It requires a path to be selected
##It will use the first three nodes of this path
## Dimensions of a triangle__
#
# /`__
# / a_c``--__
# / ``--__ s_a
# s_b / ``--__
# /a_a a_b`--__
# /--------------------------------``B
# A s_b
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( t *c C s� | d k rB | j } i | j d 6t | j � d 6| j d 6} n0 | } i | j d 6t | j � d 6| j d 6} t | | � \ } } i t j
| � d 6| t j d d � 6t | � d 6t | � d 6t | � d
6}
t j
j | t j d d � |
� d S(
Ni t strokes stroke-widtht fillt stylet labelt inkscapet cxt cyt rt circlet svg( t d_radt d_colt strt d_tht d_fillt c_colt c_tht c_fillt get_cartesian_ptt simplestylet formatStylet inkext addNSt etreet
SubElement( t radt centret paramsR t namet parentR t
circ_styleR R t circ_attribs( ( s4 /usr/share/inkscape/extensions/draw_from_triangle.pyt draw_SVG_circle- s -*c
C s( t | | � \ } } } i | j d 6t | j � d 6| j d 6} i t j | � d 6| t j d d � 6d t | d � d t | d
� d t | d � d t | d
� d t | d � d t | d
� d t | d � d t | d
� d d
6} t j j
| t j d d � | � d S( NR s stroke-widthR R R R s M i t ,i s L s zt dt pathR
( t get_cartesian_trit l_colR
t l_tht l_fillR R R R R R (
t vert_matR R R R t p1t p2t p3t tri_stylet tri_attribs( ( s4 /usr/share/inkscape/extensions/draw_from_triangle.pyt draw_SVG_tri= s *�c C s� | \ } } | \ } } i | j d 6t | j � d 6| j d 6} i t j | � d 6| t j d d � 6d t | � d t | � d t | � d t | � d
6}
t j j | t j d d � |
� d S(
NR s stroke-widthR R R R s M R"