Code

Patch from codedread. Prevents rendering of title/desc/metadata elements in text...
[inkscape.git] / src / display / inkscape-cairo.cpp
index 2ca6cb91d0efb3a7e0e849894cf6a44ccd3294d0..b67ac1311cb703d229ff472e768a30cb5c738872 100644 (file)
@@ -10,7 +10,6 @@
 
 #include <cairo.h>
 
-#include <typeinfo>
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
@@ -55,7 +54,7 @@ nr_create_cairo_context_for_data (NRRectL *area, NRRectL *buf_area, unsigned cha
 
 /** Creates a cairo context to render to the given SPCanvasBuf on the given area */
 cairo_t *
-nr_create_cairo_context_canvasbuf (NRRectL *area, SPCanvasBuf *b)
+nr_create_cairo_context_canvasbuf (NRRectL */*area*/, SPCanvasBuf *b)
 {
     return nr_create_cairo_context_for_data (&(b->rect), &(b->rect), b->buf, b->buf_rowstride);
 }
@@ -160,9 +159,9 @@ feed_curve_to_cairo (cairo_t *ct, NArtBpath const *bpath, NR::Matrix trans, NR::
 static void
 feed_curve_to_cairo(cairo_t *cr, Geom::Curve const &c, Geom::Matrix & trans, Geom::Rect view, bool optimize_stroke)
 {
-    if( typeid(c) == typeid(Geom::LineSegment) ||
-        typeid(c) == typeid(Geom::HLineSegment) ||
-        typeid(c) == typeid(Geom::VLineSegment) )
+    if( dynamic_cast<Geom::LineSegment const*>(&c) ||
+        dynamic_cast<Geom::HLineSegment const*>(&c) ||
+        dynamic_cast<Geom::VLineSegment const*>(&c) )
     {
         Geom::Point end_tr = c.finalPoint() * trans;
         if (!optimize_stroke) {