Code

Updating to trunk
[inkscape.git] / src / display / nr-filter-tile.cpp
index 69d577687f590b3305bda5ec31c2a657f205c9ef..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
  *
  */
 
 #include "display/nr-filter-tile.h"
-namespace NR {
+#include "display/nr-filter-units.h"
+
+namespace Inkscape {
+namespace Filters {
 
 FilterTile::FilterTile()
 {
@@ -24,8 +27,13 @@ FilterPrimitive * FilterTile::create() {
 FilterTile::~FilterTile()
 {}
 
-int FilterTile::render(FilterSlot &slot, Matrix const &trans) {
+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,
@@ -36,17 +44,25 @@ int FilterTile::render(FilterSlot &slot, Matrix const &trans) {
     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*/)
 {
 }
 
-} /* namespace NR */
+FilterTraits FilterTile::get_input_traits() {
+    return TRAIT_PARALLER;
+}
+
+} /* namespace Filters */
+} /* namespace Inkscape */
 
 /*
   Local Variables: