/***************************************************************************
 *   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 SVGPATHPARSERIMPL_H
#define SVGPATHPARSERIMPL_H

#include <svgpathparser.h>

class VectorElement;
/**
@author Hans Oischinger
*/
class SVGPathParserImpl : public SVGPathParser
{
public:
  SVGPathParserImpl();
  virtual ~SVGPathParserImpl();
  
  void parseSVG_D( const QString &d, VectorElement* e, bool process = false );
  void parseSVG_PolyPoints( const QString &d, VectorElement* e, bool process = false );
  
protected:
  virtual void svgMoveTo(double x1, double y1, bool closed, bool abs = true);
  virtual void svgLineTo(double x1, double y1, bool abs = true);
  virtual void svgLineToHorizontal(double x, bool abs = true);
  virtual void svgLineToVertical(double y, bool abs = true);
  virtual void svgCurveToCubic(double x1, double y1, double x2, double y2, double x, double y, bool abs = true);
  virtual void svgCurveToCubicSmooth(double x, double y, double x2, double y2, bool abs = true);
  virtual void svgCurveToQuadratic(double x, double y, double x1, double y1, bool abs = true);
  virtual void svgCurveToQuadraticSmooth(double x, double y, bool abs = true);
  virtual void svgArcTo(double x, double y, double r1, double r2, double angle, bool largeArcFlag, bool sweepFlag, bool abs = true);
  virtual void svgClosePath();

private:
  VectorElement* m_element;
};

#endif
