1
#define __NR_FILTER_PRIMITIVE_CPP__
4
* SVG filters rendering
7
* Niko Kiirala <niko@kiirala.com>
9
* Copyright (C) 2006 Niko Kiirala
11
* Released under GNU GPL, read the file 'COPYING' for more information
14
#include "display/nr-filter-primitive.h"
15
#include "display/nr-filter-types.h"
16
#include "libnr/nr-pixblock.h"
17
#include "svg/svg-length.h"
22
FilterPrimitive::FilterPrimitive()
24
_input = NR_FILTER_SLOT_NOT_SET;
25
_output = NR_FILTER_SLOT_NOT_SET;
27
// These defaults are according to SVG standard.
28
// NB: SVGLength.set takes prescaled percent values: 1 means 100%
29
_region_x.set(SVGLength::PERCENT, 0, 0);
30
_region_y.set(SVGLength::PERCENT, 0, 0);
31
_region_width.set(SVGLength::PERCENT, 1, 0);
32
_region_height.set(SVGLength::PERCENT, 1, 0);
35
FilterPrimitive::~FilterPrimitive()
40
void FilterPrimitive::area_enlarge(NRRectL &/*area*/, Geom::Matrix const &/*m*/)
42
// This doesn't need to do anything by default
45
void FilterPrimitive::set_input(int slot) {
49
void FilterPrimitive::set_input(int input, int slot) {
50
if (input == 0) _input = slot;
53
void FilterPrimitive::set_output(int slot) {
54
if (slot >= 0) _output = slot;
57
FilterTraits FilterPrimitive::get_input_traits() {
58
return TRAIT_ANYTHING;
61
} /* namespace Filters */
62
} /* namespace Inkscape */
67
c-file-style:"stroustrup"
68
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
73
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :