summaryrefslogtreecommitdiffstats
path: root/src/livarot/PathCutting.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2008-08-05 14:33:46 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2008-08-05 14:33:46 +0000
commit0651eb9e41d0e6680126456d6b7b665154ab7660 (patch)
tree794a0b30225009643ef882d51010bce5c8ae9cf8 /src/livarot/PathCutting.cpp
parentmore mockup on svgfonts dialog (diff)
downloadinkscape-0651eb9e41d0e6680126456d6b7b665154ab7660.tar.gz
inkscape-0651eb9e41d0e6680126456d6b7b665154ab7660.zip
Use is_straight_curve() instead of three separate dynamic casts
(bzr r6564)
Diffstat (limited to 'src/livarot/PathCutting.cpp')
-rw-r--r--src/livarot/PathCutting.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/livarot/PathCutting.cpp b/src/livarot/PathCutting.cpp
index 3a7bd71ad..47956031f 100644
--- a/src/livarot/PathCutting.cpp
+++ b/src/livarot/PathCutting.cpp
@@ -28,6 +28,7 @@
#include <2geom/sbasis-to-bezier.h>
#include <2geom/curves.h>
#include "../display/canvas-bpath.h"
+#include "helper/geom-curves.h"
void Path::DashPolyline(float head,float tail,float body,int nbD,float *dashs,bool stPlain,float stOffset)
{
@@ -379,9 +380,7 @@ Path::MakePathVector()
void Path::AddCurve(Geom::Curve const &c)
{
- if( dynamic_cast<Geom::LineSegment const*>(&c) ||
- dynamic_cast<Geom::HLineSegment const*>(&c) ||
- dynamic_cast<Geom::VLineSegment const*>(&c) )
+ if( is_straight_curve(c) )
{
LineTo( from_2geom(c.finalPoint()) );
}