index f45f909f62c148d95f62530b03332ddcd9620596..32467e3decbe956d151fd5df69b57d30a4f21a63 100644 (file)
_input = NR_FILTER_SLOT_NOT_SET;
_output = NR_FILTER_SLOT_NOT_SET;
+ // These defaults are according to SVG standard.
+ // NB: SVGLength.set takes prescaled percent values: 1 means 100%
_region_x.set(SVGLength::PERCENT, 0, 0);
_region_y.set(SVGLength::PERCENT, 0, 0);
- _region_width.set(SVGLength::PERCENT, 100, 0);
- _region_height.set(SVGLength::PERCENT, 100, 0);
+ _region_width.set(SVGLength::PERCENT, 1, 0);
+ _region_height.set(SVGLength::PERCENT, 1, 0);
}
FilterPrimitive::~FilterPrimitive()
// Nothing to do here
}
-int FilterPrimitive::render(FilterSlot &slot, NRMatrix const *trans) {
- if(trans) {
- return this->render(slot, *trans);
- } else {
- Matrix tmp;
- tmp.set_identity();
- return this->render(slot, tmp);
- }
-}
-
-int FilterPrimitive::get_enlarge(Matrix const &m)
+void FilterPrimitive::area_enlarge(NRRectL &/*area*/, Matrix const &/*m*/)
{
- return 0;
+ // This doesn't need to do anything by default
}
void FilterPrimitive::set_input(int slot) {
}
void FilterPrimitive::set_input(int input, int slot) {
- if (slot == 0) _input = slot;
+ if (input == 0) _input = slot;
}
void FilterPrimitive::set_output(int slot) {
if (slot >= 0) _output = slot;
}
+FilterTraits FilterPrimitive::get_input_traits() {
+ return TRAIT_ANYTHING;
+}
+
} /* namespace NR */
/*