Code

Patch from codedread. Prevents rendering of title/desc/metadata elements in text...
[inkscape.git] / src / display / nr-filter.cpp
index 770d9d0a97e7f1acfdf99af3bf3696f9468d1fde..f7a04fd50383541d17dbd62f395b26ff993299a5 100644 (file)
@@ -13,6 +13,8 @@
 
 #include <glib.h>
 #include <cmath>
+#include <cstring>
+#include <string>
 
 #include "display/nr-filter.h"
 #include "display/nr-filter-primitive.h"
@@ -44,7 +46,7 @@
 #include "libnr/nr-scale.h"
 #include "svg/svg-length.h"
 #include "sp-filter-units.h"
-#if defined (SOLARIS_2_8)
+#if defined (SOLARIS) && (SOLARIS == 8)
 #include "round.h"
 using Inkscape::round;
 #endif 
@@ -109,7 +111,7 @@ int Filter::render(NRArenaItem const *item, NRPixBlock *pb)
        return 1; 
     }
 
-    Matrix trans = *item->ctm;
+    Matrix trans = item->ctm;
     FilterSlot slot(_slot_count, item);
 
     Rect item_bbox;
@@ -176,7 +178,7 @@ int Filter::render(NRArenaItem const *item, NRPixBlock *pb)
 
     NRPixBlock *in = new NRPixBlock;
     nr_pixblock_setup_fast(in, pb->mode, pb->area.x0, pb->area.y0,
-                           pb->area.x1, pb->area.y1, false);
+                           pb->area.x1, pb->area.y1, true);
     if (in->size != NR_PIXBLOCK_SIZE_TINY && in->data.px == NULL) {
         g_warning("NR::Filter::render: failed to reserve temporary buffer");
         return 0;
@@ -196,11 +198,8 @@ int Filter::render(NRArenaItem const *item, NRPixBlock *pb)
     }
     in = NULL; // in is now handled by FilterSlot, we should not touch it
 
-    // TODO: filters may need both filterUnits and primitiveUnits,
-    // so we should pass FilterUnits to render method, not just one Matrix
-    Matrix primitiveunits2pixblock = units.get_matrix_primitiveunits2pb();
     for (int i = 0 ; i < _primitive_count ; i++) {
-        _primitive[i]->render(slot, primitiveunits2pixblock);
+        _primitive[i]->render(slot, units);
     }
 
     slot.get_final(_output_slot, pb);