Code

A modification of pixops_mix that allows for input images that extend beyond the...
[inkscape.git] / src / display / nr-filter-tile.cpp
index 01453da39447111376981bd7b615fe57d85a0297..898db9f5352b15c65bec088472efee326033a241 100644 (file)
@@ -2,7 +2,7 @@
  * feTile filter primitive renderer
  *
  * Authors:
- *   Felipe CorrĂȘa da Silva Sanches <felipe.sanches@gmail.com>
+ *   Felipe CorrĂȘa da Silva Sanches <juca@members.fsf.org>
  *
  * Copyright (C) 2007 authors
  *
@@ -12,7 +12,8 @@
 #include "display/nr-filter-tile.h"
 #include "display/nr-filter-units.h"
 
-namespace NR {
+namespace Inkscape {
+namespace Filters {
 
 FilterTile::FilterTile()
 {
@@ -26,8 +27,13 @@ FilterPrimitive * FilterTile::create() {
 FilterTile::~FilterTile()
 {}
 
-int FilterTile::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterTile::render(FilterSlot &slot, FilterUnits const &/*units*/) {
     NRPixBlock *in = slot.get(_input);
+    if (!in) {
+        g_warning("Missing source image for feTile (in=%d)", _input);
+        return 1;
+    }
+
     NRPixBlock *out = new NRPixBlock;
 
     nr_pixblock_setup_fast(out, in->mode,
@@ -38,13 +44,16 @@ int FilterTile::render(FilterSlot &slot, FilterUnits const &units) {
     unsigned char *out_data = NR_PIXBLOCK_PX(out);
 
 //IMPLEMENT ME!
-    
+    g_warning("Renderer for feTile is not implemented.");
+    (void)in_data;
+    (void)out_data;
+
     out->empty = FALSE;
     slot.set(_output, out);
     return 0;
 }
 
-void FilterTile::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterTile::area_enlarge(NRRectL &/*area*/, Geom::Matrix const &/*trans*/)
 {
 }
 
@@ -52,7 +61,8 @@ FilterTraits FilterTile::get_input_traits() {
     return TRAIT_PARALLER;
 }
 
-} /* namespace NR */
+} /* namespace Filters */
+} /* namespace Inkscape */
 
 /*
   Local Variables: