diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2008-08-05 14:33:46 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2008-08-05 14:33:46 +0000 |
| commit | 0651eb9e41d0e6680126456d6b7b665154ab7660 (patch) | |
| tree | 794a0b30225009643ef882d51010bce5c8ae9cf8 /src/display/inkscape-cairo.cpp | |
| parent | more mockup on svgfonts dialog (diff) | |
| download | inkscape-0651eb9e41d0e6680126456d6b7b665154ab7660.tar.gz inkscape-0651eb9e41d0e6680126456d6b7b665154ab7660.zip | |
Use is_straight_curve() instead of three separate dynamic casts
(bzr r6564)
Diffstat (limited to 'src/display/inkscape-cairo.cpp')
| -rw-r--r-- | src/display/inkscape-cairo.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/display/inkscape-cairo.cpp b/src/display/inkscape-cairo.cpp index d4a9f7062..8bc9eade2 100644 --- a/src/display/inkscape-cairo.cpp +++ b/src/display/inkscape-cairo.cpp @@ -27,6 +27,7 @@ #include <2geom/path.h> #include <2geom/transforms.h> #include <2geom/sbasis-to-bezier.h> +#include "helper/geom-curves.h" /** Creates a cairo context to render to the given pixblock on the given area */ cairo_t * @@ -74,9 +75,7 @@ nr_create_cairo_context (NRRectL *area, NRPixBlock *pb) static void feed_curve_to_cairo(cairo_t *cr, Geom::Curve const &c, Geom::Matrix const & trans, Geom::Rect view, bool optimize_stroke) { - if( dynamic_cast<Geom::LineSegment const*>(&c) || - dynamic_cast<Geom::HLineSegment const*>(&c) || - dynamic_cast<Geom::VLineSegment const*>(&c) ) + if( is_straight_curve(c) ) { Geom::Point end_tr = c.finalPoint() * trans; if (!optimize_stroke) { |
