File: //usr/share/inkscape/extensions/motion.pyo
�
��Yc @ s� d Z d d l Z d d l Z d d l Z d d l Z d d l Z d e j f d � � YZ e d k r} e � Z e j
� n d S( s�
Copyright (C) 2005 Aaron Spike, aaron@ekips.org
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����Nt Motionc B s# e Z d � Z d � Z d � Z RS( c
C sv t j j | � | j j d d d d d d d d d d
d d �| j j d
d d d d d d d d d d d �d S( Ns -as --anglet actiont storet typet floatt destt anglet defaultg �F@t helps direction of the motion vectors -ms --magnitudet magnitudeg Y@s magnitude of the motion vector( t inkext Effectt __init__t OptionParsert
add_option( t self( ( s( /usr/share/inkscape/extensions/motion.pyR s c C s� | \ } } g } | j d | g � | j | | g � | } t j | } xl t | d � D]Z } | d | d k r� | | c | j 7<q_ | d | d k r_ | | c | j 7<q_ q_ W| j d | d | d g g � | d | j | d | j f | d )| d
k r?| d d !| d f } \ | d *| d d +n | j | | g � | j d
g g � t j j | j t j
d d � i t j | � d 6� }
d S( Nt Mi i t xt yt Li����i����i t Ci i t Zt patht svgt d( t appendt
simplepatht pathdefst ranget vxt vyR
t etreet
SubElementt facegroupt addNSt
formatPath( R t lastt .2t cmdt paramst at npt defst it c1t face( ( s( /usr/share/inkscape/extensions/motion.pyt makeface! s$
!&/c C s t j t j | j j � � | j j | _ t j t j | j j � � | j j | _ x�| j j
� D]�\ } } | j t j
d d � k rf t j j | j � t j
d d � � } t j j | t j
d d � � | _ | j | � | j d � } | r| j d | � | j d d � n | j d � } | j j d | � t j | j d � � } x�| D]�\ } } g } | d k r�|
| d | d d
!| d f } g t j | | j | j f � D]( } d | k o�d
k n r�| ^ q�} | j � n g } t | � d k r2| d k r2| j | | g � n_t | � d
k r�t j | | d � \ }
} | j | t |
d
|
d |
d � g � | j | t | d
| d | d � g � n� t | � d k r�t j | | d � \ }
} t j | | d
� \ } } | j | t |
d
|
d |
d � g � | j | t | d
| d | d � g � | j | t | d
| d | d � g � n x, | D]$ } | j |
| � | d
d }
q�W| d k r�| d } n | d k r�| }
q^| d }
q^Wqf qf Wd S( NR R t gt transformt t styleR R i i i����i i R i R R ( R R ( t matht cost radianst optionsR R R t sinR t selectedt iteritemst tagR
R"