nr-filter-convolve-matrix.cpp revision ad2113df738be4dac5ccb58cedbedd74b045a0ab
/*
* feConvolveMatrix filter primitive renderer
*
* Authors:
* Felipe CorrĂȘa da Silva Sanches <felipe.sanches@gmail.com>
*
* Copyright (C) 2007 authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "display/nr-filter-convolve-matrix.h"
#include "display/nr-filter-units.h"
#include "display/nr-filter-utils.h"
#include <vector>
namespace NR {
{}
return new FilterConvolveMatrix();
}
{}
if (px<0) return false;
if (py<0) return false;
if (px>w) return false;
if (py>h) return false;
return true;
}
if (!in) {
return 1;
}
true);
int i, j, x, y;
unsigned int index;
unsigned int kernel_index;
result_R = 0;
result_G = 0;
result_B = 0;
result_A = 0;
for (i=0; i < orderY; i++){
for (j=0; j < orderX; j++){
}
}
}
if( preserveAlpha ) {
} else {
}
}
}
return 0;
}
}
}
}
}
void FilterConvolveMatrix::set_divisor(double d) {
divisor = d;
}
void FilterConvolveMatrix::set_bias(double b) {
bias = b;
}
kernelMatrix = km;
}
}
preserveAlpha = pa;
}
{
//Seems to me that since this filter's operation is resolution dependent,
// some spurious pixels may still appear at the borders when low zooming or rotating. Needs a better fix.
}
return TRAIT_PARALLER;
}
} /* namespace NR */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :