[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/khtml-svg
From: Nikolas Zimmermann <wildfox () kde ! org>
Date: 2006-03-29 22:39:40
Message-ID: 1143671980.896222.24872.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 524186 by wildfox:
Merge path support from ksvg2 - basics work, complex paths show subtle problems
M +0 -33 svg/CONVERSION-TODO-LIST
M +5 -0 svg/Makefile.am
A svg/SVGPathElementImpl.cpp [License: LGPL (v2+) (wrong address)]
A svg/SVGPathElementImpl.h [License: LGPL (v2+) (wrong address)]
A svg/SVGPathSegArcImpl.cpp [License: LGPL (v2+) (wrong address)]
A svg/SVGPathSegArcImpl.h [License: LGPL (v2+) (wrong address)]
A svg/SVGPathSegClosePathImpl.cpp [License: LGPL (v2+) (wrong \
address)] A svg/SVGPathSegClosePathImpl.h [License: LGPL (v2+) (wrong \
address)] A svg/SVGPathSegCurvetoCubicImpl.cpp [License: LGPL (v2+) \
(wrong address)] A svg/SVGPathSegCurvetoCubicImpl.h [License: LGPL \
(v2+) (wrong address)] A svg/SVGPathSegCurvetoCubicSmoothImpl.cpp \
[License: LGPL (v2+) (wrong address)] A \
svg/SVGPathSegCurvetoCubicSmoothImpl.h [License: LGPL (v2+) (wrong address)] A \
svg/SVGPathSegCurvetoQuadraticImpl.cpp [License: LGPL (v2+) (wrong address)] A \
svg/SVGPathSegCurvetoQuadraticImpl.h [License: LGPL (v2+) (wrong address)] A \
svg/SVGPathSegCurvetoQuadraticSmoothImpl.cpp [License: LGPL (v2+) (wrong address)] \
A svg/SVGPathSegCurvetoQuadraticSmoothImpl.h [License: LGPL (v2+) \
(wrong address)] M +1 -1 svg/SVGPathSegImpl.h
A svg/SVGPathSegLinetoHorizontalImpl.cpp [License: LGPL (v2+) (wrong \
address)] A svg/SVGPathSegLinetoHorizontalImpl.h [License: LGPL (v2+) \
(wrong address)] A svg/SVGPathSegLinetoImpl.cpp [License: LGPL (v2+) \
(wrong address)] A svg/SVGPathSegLinetoImpl.h [License: LGPL (v2+) \
(wrong address)] A svg/SVGPathSegLinetoVerticalImpl.cpp [License: LGPL \
(v2+) (wrong address)] A svg/SVGPathSegLinetoVerticalImpl.h [License: \
LGPL (v2+) (wrong address)] A svg/SVGPathSegMovetoImpl.cpp [License: \
LGPL (v2+) (wrong address)] A svg/SVGPathSegMovetoImpl.h [License: \
LGPL (v2+) (wrong address)] M +16 -15 svg/svgpathparser.h
M +50 -44 xml/dom_docimpl.cpp
--- branches/work/khtml-svg/svg/CONVERSION-TODO-LIST #524185:524186
@@ -51,39 +51,6 @@
SVGMarkerElementImpl.cpp
SVGMarkerElementImpl.h
-SVGPathElementImpl.cpp
-SVGPathElementImpl.h
-
-SVGPathSegArcImpl.cpp
-SVGPathSegArcImpl.h
-
-SVGPathSegClosePathImpl.cpp
-SVGPathSegClosePathImpl.h
-
-SVGPathSegCurvetoCubicImpl.cpp
-SVGPathSegCurvetoCubicImpl.h
-
-SVGPathSegCurvetoCubicSmoothImpl.cpp
-SVGPathSegCurvetoCubicSmoothImpl.h
-
-SVGPathSegCurvetoQuadraticImpl.cpp
-SVGPathSegCurvetoQuadraticImpl.h
-
-SVGPathSegCurvetoQuadraticSmoothImpl.cpp
-SVGPathSegCurvetoQuadraticSmoothImpl.h
-
-SVGPathSegLinetoHorizontalImpl.cpp
-SVGPathSegLinetoHorizontalImpl.h
-
-SVGPathSegLinetoImpl.cpp
-SVGPathSegLinetoImpl.h
-
-SVGPathSegLinetoVerticalImpl.cpp
-SVGPathSegLinetoVerticalImpl.h
-
-SVGPathSegMovetoImpl.cpp
-SVGPathSegMovetoImpl.h
-
SVGPatternElementImpl.cpp
SVGPatternElementImpl.h
--- branches/work/khtml-svg/svg/Makefile.am #524185:524186
@@ -22,4 +22,9 @@
SVGRectElementImpl.cpp SVGGElementImpl.cpp KCanvasRenderingStyle.cpp \
SVGPolyElementImpl.cpp SVGPolylineElementImpl.cpp SVGPolygonElementImpl.cpp \
SVGDefsElementImpl.cpp \
+ SVGPathSegArcImpl.cpp SVGPathSegClosePathImpl.cpp \
+ SVGPathSegCurvetoCubicImpl.cpp SVGPathSegCurvetoCubicSmoothImpl.cpp \
+ SVGPathSegCurvetoQuadraticImpl.cpp SVGPathSegCurvetoQuadraticSmoothImpl.cpp \
+ SVGPathSegLinetoHorizontalImpl.cpp SVGPathSegLinetoVerticalImpl.cpp \
+ SVGPathSegLinetoImpl.cpp SVGPathSegMovetoImpl.cpp SVGPathElementImpl.cpp \
svgpathparser.cpp
--- branches/work/khtml-svg/svg/SVGPathSegImpl.h #524185:524186
@@ -41,7 +41,7 @@
PATHSEG_CURVETO_QUADRATIC_ABS = 8,
PATHSEG_CURVETO_QUADRATIC_REL = 9,
PATHSEG_ARC_ABS = 10,
- PATHSEG_ARC_RES = 11,
+ PATHSEG_ARC_REL = 11,
PATHSEG_LINETO_HORIZONTAL_ABS = 12,
PATHSEG_LINETO_HORIZONTAL_REL = 13,
PATHSEG_LINETO_VERTICAL_ABS = 14,
--- branches/work/khtml-svg/svg/svgpathparser.h #524185:524186
@@ -17,8 +17,8 @@
Boston, MA 02111-1307, USA.
*/
-#ifndef __SVGPATHPARSER_H__
-#define __SVGPATHPARSER_H__
+#ifndef KSVG_SVGPATHPARSER_H
+#define KSVG_SVGPATHPARSER_H
class QString;
@@ -30,10 +30,10 @@
{
public:
virtual ~SVGPolyParser() { }
- void parsePoints( const QString &points ) const;
+ void parsePoints(const QString &points) const;
protected:
- virtual void svgPolyTo( double x1, double y1, int nr ) const = 0;
+ virtual void svgPolyTo(double x1, double y1, int nr) const = 0;
};
/**
@@ -51,21 +51,22 @@
{
public:
virtual ~SVGPathParser() { }
- void parseSVG( const QString &d, bool process = false );
+ void parseSVG(const QString &d, bool process = false);
protected:
- virtual void svgMoveTo( double x1, double y1, bool closed, bool abs = true ) \
= 0;
- virtual void svgLineTo( double x1, double y1, bool abs = true ) = 0;
- 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 ) = 0;
- 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 \
svgMoveTo(double x1, double y1, bool closed, bool abs = true) = 0; + virtual \
void svgLineTo(double x1, double y1, bool abs = true) = 0; + 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) = 0; + 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() = 0;
+
private:
- void calculateArc( bool relative, double &curx, double &cury, double angle, \
double x, double y, double r1, double r2, bool largeArcFlag, bool sweepFlag ); + \
void calculateArc(bool relative, double &curx, double &cury, double angle, double x, \
double y, double r1, double r2, bool largeArcFlag, bool sweepFlag); };
};
--- branches/work/khtml-svg/xml/dom_docimpl.cpp #524185:524186
@@ -89,6 +89,7 @@
#include "svg/SVGSVGElementImpl.h"
#include "svg/SVGDefsElementImpl.h"
#include "svg/SVGRectElementImpl.h"
+#include "svg/SVGPathElementImpl.h"
#include "svg/SVGCircleElementImpl.h"
#include "svg/SVGEllipseElementImpl.h"
#include "svg/SVGGElementImpl.h"
@@ -1010,51 +1011,56 @@
ElementImpl *n = 0;
switch(id)
{
- case SVGID_SVG:
- {
- n = new KSVG::SVGSVGElementImpl(docPtr());
- break;
- }
- case SVGID_RECT:
- {
- n = new KSVG::SVGRectElementImpl(docPtr());
- break;
- }
- case SVGID_CIRCLE:
- {
- n = new KSVG::SVGCircleElementImpl(docPtr());
- break;
- }
- case SVGID_ELLIPSE:
- {
- n = new KSVG::SVGEllipseElementImpl(docPtr());
- break;
- }
- case SVGID_G:
- {
- n = new KSVG::SVGGElementImpl(docPtr());
- break;
- }
- case SVGID_POLYLINE:
- {
- n = new KSVG::SVGPolylineElementImpl(docPtr());
- break;
- }
- case SVGID_POLYGON:
- {
- n = new KSVG::SVGPolygonElementImpl(docPtr());
- break;
- }
- case SVGID_DEFS:
- {
- n = new KSVG::SVGDefsElementImpl(docPtr());
- break;
- }
- default:
- break;
- }
+ case SVGID_SVG:
+ {
+ n = new KSVG::SVGSVGElementImpl(docPtr());
+ break;
+ }
+ case SVGID_RECT:
+ {
+ n = new KSVG::SVGRectElementImpl(docPtr());
+ break;
+ }
+ case SVGID_CIRCLE:
+ {
+ n = new KSVG::SVGCircleElementImpl(docPtr());
+ break;
+ }
+ case SVGID_ELLIPSE:
+ {
+ n = new KSVG::SVGEllipseElementImpl(docPtr());
+ break;
+ }
+ case SVGID_G:
+ {
+ n = new KSVG::SVGGElementImpl(docPtr());
+ break;
+ }
+ case SVGID_POLYLINE:
+ {
+ n = new KSVG::SVGPolylineElementImpl(docPtr());
+ break;
+ }
+ case SVGID_POLYGON:
+ {
+ n = new KSVG::SVGPolygonElementImpl(docPtr());
+ break;
+ }
+ case SVGID_PATH:
+ {
+ n = new KSVG::SVGPathElementImpl(docPtr());
+ break;
+ }
+ case SVGID_DEFS:
+ {
+ n = new KSVG::SVGDefsElementImpl(docPtr());
+ break;
+ }
+ default:
+ break;
+ }
- return n;
+ return n;
}
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic