File: //usr/share/inkscape/extensions/pathmodifier.pyc
�
��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 d l Z d d l Z d d l Z d d l Td � Z
d e j f d � � YZ d e f d � � YZ
d S( s
Copyright (C) 2006 Jean-Francois Barraud, barraud@math.univ-lille1.fr
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.
barraud@math.univ-lille1.fr
This code defines a basic class (PathModifier) of effects whose purpose is
to somehow deform given objects: one common tasks for all such effect is to
convert shapes, groups, clones to paths. The class has several functions to
make this (more or less!) easy.
As an exemple, a second class (Diffeo) is derived from it,
to implement deformations of the form X=f(x,y), Y=g(x,y)...
TODO: Several handy functions are defined, that might in fact be of general
interest and that should be shipped out in separate files...
i����N( t *c C su g } | j d � } | | k r1 | j | � n x= | D]5 } t | � t | � k rZ Pn | t | | � 7} q8 W| S( Nt id( t gett appendt lent zSort( t inNodet idListt
sortedListt theidt child( ( s. /usr/share/inkscape/extensions/pathmodifier.pyR . s
t PathModifierc B s� e Z d � Z d � Z d � Z e d � Z e e d � Z d � Z d � Z d � Z
e d � Z e d � Z e d
� Z
e d � Z d � Z RS(
c C s t j j | � d S( N( t inkext Effectt __init__( t self( ( s. /usr/share/inkscape/extensions/pathmodifier.pyR ; s c C s� i } x~ | j � D]p \ } } t j | � } | j j d � d } | j d | j | � � | j � j | � | | | j d � <q W| S( Nt }i����R (
t iteritemst copyt deepcopyt tagt splitt sett uniqueIdt getparentR R ( R t aListt clonesR t nodet clonet myid( ( s. /usr/share/inkscape/extensions/pathmodifier.pyt duplicateNodesB s c C sn d | t j d d � f } xK t | j j � j d | d t j �� ri d | t j d d � f } q W| S( Ns %s%04ii i'