/***************************************************************************
 *   Copyright (C) 2004 by Hans Oischinger                                 *
 *   hans.oischinger@kdemail.net                                           *
 *                                                                         *
 *   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 Steet, Fifth Floor, Boston, MA 02110-1301, USA.             *
 ***************************************************************************/
#ifndef ESCALECMD_H
#define ESCALECMD_H

#include "ecommand.h"

class ElementNode;
class ElementSelection;
class Transform;
/**
@author Hans Oischinger

FIXME: This command is deprecated.Replace it by modifying ETransformcommand in a way
that it can modify paths instead of applying matrixes.
*/
class EScaleCMD : public ECommand
{
public:
  /**
   * Constructor for the Scale Elements Command
   * @param sx Scale factor in x direction
   * @param sy Scale factor in y direction
   * @param xorigin X origin of the transformation
   * @param yorigin Y origin of the transformation
   * @param tx also apply a transformation of tx in x direction
   * @param ty also apply a transformation of ty in y direction
   */
  EScaleCMD( double sx, double sy, int xorigin, int yorigin, int tx=0, int ty=0 );
  EScaleCMD( ElementNode* element, double sx, double sy, int xorigin, int yorigin, int tx=0, int ty=0 );
  ~EScaleCMD();

  virtual bool visit( VectorElement& element );

  void execute();
  void unexecute();

private:
  ElementSelection* m_selection;
  double m_sx;
  double m_sy;
  int m_xorigin;
  int m_yorigin;
  int m_tx;
  int m_ty;
};

#endif
