sp-filter.cpp revision 9c2f0b322c3f754ddafb5dbf768c2379354380bc
1195N/A#ifdef HAVE_CONFIG_H
#include "attributes.h"
#include "document.h"
#include "sp-filter.h"
#include "sp-filter-reference.h"
#include "sp-filter-primitive.h"
#include "uri.h"
#include <cstring>
#include <string>
#define SP_MACROS_SILENT
#include "macros.h"
#include "display/nr-filter.h"
static Inkscape::XML::Node *sp_filter_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
if (!filter_type) {
sizeof(SPFilterClass),
sizeof(SPFilter),
return filter_type;
filter->x = 0;
filter->y = 0;
* sp-object-repr.cpp's repr_name_entries array.
switch (key) {
case SP_ATTR_FILTERUNITS:
if (value) {
case SP_ATTR_PRIMITIVEUNITS:
if (value) {
case SP_ATTR_X:
case SP_ATTR_Y:
case SP_ATTR_WIDTH:
case SP_ATTR_HEIGHT:
case SP_ATTR_FILTERRES:
case SP_ATTR_XLINK_HREF:
if (value) {
sp_filter_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags)
// Original from sp-item-group.cpp
if (!repr) {
if (crepr) {
// The color-interpolation-filters attribute is initially set to linearRGB according to the SVG standard.
// However, Inkscape completely ignores it and implicitly assumes that it is sRGB (like color-interpolation).
// To mitigate this problem I've (Jasper van de Gronde,th.v.d.gronde@hccnet.nl) added this to ensure that at least
// In the future Inkscape should have proper support for the color-interpolation properties and this should be changed.
return repr;
if (old_ref) {
while (primitive_obj) {
int count = 0;
while (primitive_obj) {
return count;
return value;
switch (image) {
return i->first;
int largest = 0;
while (primitive_obj) {
int index;
if (result)