sp-filter-primitive.cpp revision a7f76d0e65f2b7a3957ba51bcc4aa25f07ac2d8c
4070N/A#ifdef HAVE_CONFIG_H
4070N/A#include "attributes.h"
4070N/A#include "sp-filter-primitive.h"
4070N/A#include "sp-filter.h"
4070N/A#include "display/nr-filter-primitive.h"
4070N/A#include "display/nr-filter-types.h"
4070N/A // We must keep track if a value is set or not, if not set then the region defaults to 0%, 0%,
4070N/A // percentages are in terms of bounding box or viewbox, depending on value of "primitiveUnits"
4070N/A // NB: SVGLength.set takes prescaled percent values: 1 means 100%
4070N/A * Reads the Inkscape::XML::Node, and initializes SPFilterPrimitive variables. For this to get called,
4070N/A * sp-object-repr.cpp's repr_name_entries array.
4070N/A object->readAttr( "style" ); // struct not derived from SPItem, we need to do this ourselves.
4070N/A case SP_ATTR_IN:
4070N/A case SP_ATTR_RESULT:
case SP_ATTR_X:
case SP_ATTR_Y:
case SP_ATTR_WIDTH:
case SP_ATTR_HEIGHT:
this->x._set = true;
this->y._set = true;
Inkscape::XML::Node* SPFilterPrimitive::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) {
if (!repr) {
return repr;
switch (name[0]) {
return slot;
void sp_filter_primitive_renderer_common(SPFilterPrimitive *sp_prim, Inkscape::Filters::FilterPrimitive *nr_prim)