File: //usr/share/inkscape/extensions/triangle.pyc
�
��Yc @ s� d Z d d l Z d d l Z d d l Z d d l m Z d d l Td � Z d � Z d � Z d � Z
d � Z d
� Z d � Z
d e j f d
� � YZ e d k r� e � Z e j � n d S( s�
Copyright (C) 2007 John Beard john.j.beard@gmail.com
##This extension allows you to draw a triangle given certain information
## about side length or angles.
##Measurements of the triangle
C(x_c,y_c)
/`__
/ a_c``--__
/ ``--__ s_a
s_b / ``--__
/a_a a_b`--__
/--------------------------------``B(x_b, y_b)
A(x_a,y_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 computePointInNode( t *c C s7 | \ } } | \ } }
| \ } } | \ }
} i d d 6t | � d 6d d 6} i t j | � d 6| t j d d � 6d t | |
� d
t | | � d t | |
� d
t |
| � d t | |
� d
t | | � d t | |
� d
t | | � d d
6} t j j | t j d d � | � d S( Ns #000000t strokes stroke-widtht nonet fillt stylet labelt inkscapes M t ,s L s zt dt patht svg( t strt simplestylet formatStylet inkext addNSt etreet
SubElement( t .0t .1t .2t .3t widtht namet parentt x1t y1t x2t y2t x3t y3t oxt oyR t tri_attribs( ( s* /usr/share/inkscape/extensions/triangle.pyt draw_SVG_tri( s -!�c C s0 | | | | | | d | | } t | � S( Ni ( t acos( t at bt ct cosx( ( s* /usr/share/inkscape/extensions/triangle.pyt angle_from_3_sides2 s &c C sF | | | | d | | t | � } | d k r>