summaryrefslogtreecommitdiffstats
path: root/src/filters
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2009-01-02 12:18:25 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2009-01-02 12:18:25 +0000
commitce6f12df4a3f9969f1e42aeaa3cfdd31e0602ae6 (patch)
tree301702c746a4de6dbd5f9eff52b90256c9f2ba9c /src/filters
parentreorder LPE list (diff)
downloadinkscape-ce6f12df4a3f9969f1e42aeaa3cfdd31e0602ae6.tar.gz
inkscape-ce6f12df4a3f9969f1e42aeaa3cfdd31e0602ae6.zip
Move filters into their own namespace Inkscape::Filters (from NR::)
(bzr r7058)
Diffstat (limited to 'src/filters')
-rw-r--r--src/filters/blend.cpp30
-rw-r--r--src/filters/blend.h2
-rw-r--r--src/filters/colormatrix.cpp26
-rw-r--r--src/filters/colormatrix.h2
-rw-r--r--src/filters/componenttransfer-funcnode.cpp20
-rw-r--r--src/filters/componenttransfer-funcnode.h2
-rw-r--r--src/filters/componenttransfer.cpp12
-rw-r--r--src/filters/componenttransfer.h2
-rw-r--r--src/filters/composite.cpp12
-rw-r--r--src/filters/convolvematrix.cpp26
-rw-r--r--src/filters/convolvematrix.h2
-rw-r--r--src/filters/diffuselighting.cpp26
-rw-r--r--src/filters/diffuselighting.h6
-rw-r--r--src/filters/displacementmap.cpp12
-rw-r--r--src/filters/flood.cpp10
-rw-r--r--src/filters/image.cpp10
-rw-r--r--src/filters/merge.cpp10
-rw-r--r--src/filters/mergenode.cpp2
-rw-r--r--src/filters/morphology.cpp22
-rw-r--r--src/filters/morphology.h2
-rw-r--r--src/filters/offset.cpp10
-rw-r--r--src/filters/specularlighting.cpp26
-rw-r--r--src/filters/specularlighting.h6
-rw-r--r--src/filters/tile.cpp10
-rw-r--r--src/filters/turbulence.cpp22
-rw-r--r--src/filters/turbulence.h2
26 files changed, 158 insertions, 154 deletions
diff --git a/src/filters/blend.cpp b/src/filters/blend.cpp
index 8c2d7978e..709130ada 100644
--- a/src/filters/blend.cpp
+++ b/src/filters/blend.cpp
@@ -40,7 +40,7 @@ static void sp_feBlend_release(SPObject *object);
static void sp_feBlend_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feBlend_update(SPObject *object, SPCtx *ctx, guint flags);
static Inkscape::XML::Node *sp_feBlend_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static void sp_feBlend_build_renderer(SPFilterPrimitive *sp_prim, NR::Filter *filter);
+static void sp_feBlend_build_renderer(SPFilterPrimitive *sp_prim, Inkscape::Filters::Filter *filter);
static SPFilterPrimitiveClass *feBlend_parent_class;
@@ -85,7 +85,7 @@ sp_feBlend_class_init(SPFeBlendClass *klass)
static void
sp_feBlend_init(SPFeBlend *feBlend)
{
- feBlend->in2 = NR::NR_FILTER_SLOT_NOT_SET;
+ feBlend->in2 = Inkscape::Filters::NR_FILTER_SLOT_NOT_SET;
}
/**
@@ -115,35 +115,35 @@ sp_feBlend_release(SPObject *object)
((SPObjectClass *) feBlend_parent_class)->release(object);
}
-static NR::FilterBlendMode sp_feBlend_readmode(gchar const *value)
+static Inkscape::Filters::FilterBlendMode sp_feBlend_readmode(gchar const *value)
{
- if (!value) return NR::BLEND_NORMAL;
+ if (!value) return Inkscape::Filters::BLEND_NORMAL;
switch (value[0]) {
case 'n':
if (strncmp(value, "normal", 6) == 0)
- return NR::BLEND_NORMAL;
+ return Inkscape::Filters::BLEND_NORMAL;
break;
case 'm':
if (strncmp(value, "multiply", 8) == 0)
- return NR::BLEND_MULTIPLY;
+ return Inkscape::Filters::BLEND_MULTIPLY;
break;
case 's':
if (strncmp(value, "screen", 6) == 0)
- return NR::BLEND_SCREEN;
+ return Inkscape::Filters::BLEND_SCREEN;
break;
case 'd':
if (strncmp(value, "darken", 6) == 0)
- return NR::BLEND_DARKEN;
+ return Inkscape::Filters::BLEND_DARKEN;
break;
case 'l':
if (strncmp(value, "lighten", 7) == 0)
- return NR::BLEND_LIGHTEN;
+ return Inkscape::Filters::BLEND_LIGHTEN;
break;
default:
// do nothing by default
break;
}
- return NR::BLEND_NORMAL;
+ return Inkscape::Filters::BLEND_NORMAL;
}
/**
@@ -155,7 +155,7 @@ sp_feBlend_set(SPObject *object, unsigned int key, gchar const *value)
SPFeBlend *feBlend = SP_FEBLEND(object);
(void)feBlend;
- NR::FilterBlendMode mode;
+ Inkscape::Filters::FilterBlendMode mode;
int input;
switch(key) {
/*DEAL WITH SETTING ATTRIBUTES HERE*/
@@ -220,15 +220,15 @@ sp_feBlend_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::
return repr;
}
-static void sp_feBlend_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+static void sp_feBlend_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
g_assert(primitive != NULL);
g_assert(filter != NULL);
SPFeBlend *sp_blend = SP_FEBLEND(primitive);
- int primitive_n = filter->add_primitive(NR::NR_FILTER_BLEND);
- NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
- NR::FilterBlend *nr_blend = dynamic_cast<NR::FilterBlend*>(nr_primitive);
+ int primitive_n = filter->add_primitive(Inkscape::Filters::NR_FILTER_BLEND);
+ Inkscape::Filters::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+ Inkscape::Filters::FilterBlend *nr_blend = dynamic_cast<Inkscape::Filters::FilterBlend*>(nr_primitive);
g_assert(nr_blend != NULL);
sp_filter_primitive_renderer_common(primitive, nr_primitive);
diff --git a/src/filters/blend.h b/src/filters/blend.h
index bcb95c3c2..9f3cab475 100644
--- a/src/filters/blend.h
+++ b/src/filters/blend.h
@@ -24,7 +24,7 @@ class SPFeBlendClass;
struct SPFeBlend : public SPFilterPrimitive {
/** BLEND ATTRIBUTES HERE */
- NR::FilterBlendMode blend_mode;
+ Inkscape::Filters::FilterBlendMode blend_mode;
int in2;
};
diff --git a/src/filters/colormatrix.cpp b/src/filters/colormatrix.cpp
index 29c2458e8..a6096bdb6 100644
--- a/src/filters/colormatrix.cpp
+++ b/src/filters/colormatrix.cpp
@@ -39,7 +39,7 @@ static void sp_feColorMatrix_release(SPObject *object);
static void sp_feColorMatrix_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feColorMatrix_update(SPObject *object, SPCtx *ctx, guint flags);
static Inkscape::XML::Node *sp_feColorMatrix_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static void sp_feColorMatrix_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter);
+static void sp_feColorMatrix_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter);
static SPFilterPrimitiveClass *feColorMatrix_parent_class;
@@ -112,23 +112,23 @@ sp_feColorMatrix_release(SPObject *object)
((SPObjectClass *) feColorMatrix_parent_class)->release(object);
}
-static NR::FilterColorMatrixType sp_feColorMatrix_read_type(gchar const *value){
- if (!value) return NR::COLORMATRIX_MATRIX; //matrix is default
+static Inkscape::Filters::FilterColorMatrixType sp_feColorMatrix_read_type(gchar const *value){
+ if (!value) return Inkscape::Filters::COLORMATRIX_MATRIX; //matrix is default
switch(value[0]){
case 'm':
- if (strcmp(value, "matrix") == 0) return NR::COLORMATRIX_MATRIX;
+ if (strcmp(value, "matrix") == 0) return Inkscape::Filters::COLORMATRIX_MATRIX;
break;
case 's':
- if (strcmp(value, "saturate") == 0) return NR::COLORMATRIX_SATURATE;
+ if (strcmp(value, "saturate") == 0) return Inkscape::Filters::COLORMATRIX_SATURATE;
break;
case 'h':
- if (strcmp(value, "hueRotate") == 0) return NR::COLORMATRIX_HUEROTATE;
+ if (strcmp(value, "hueRotate") == 0) return Inkscape::Filters::COLORMATRIX_HUEROTATE;
break;
case 'l':
- if (strcmp(value, "luminanceToAlpha") == 0) return NR::COLORMATRIX_LUMINANCETOALPHA;
+ if (strcmp(value, "luminanceToAlpha") == 0) return Inkscape::Filters::COLORMATRIX_LUMINANCETOALPHA;
break;
}
- return NR::COLORMATRIX_MATRIX; //matrix is default
+ return Inkscape::Filters::COLORMATRIX_MATRIX; //matrix is default
}
/**
@@ -140,7 +140,7 @@ sp_feColorMatrix_set(SPObject *object, unsigned int key, gchar const *str)
SPFeColorMatrix *feColorMatrix = SP_FECOLORMATRIX(object);
(void)feColorMatrix;
- NR::FilterColorMatrixType read_type;
+ Inkscape::Filters::FilterColorMatrixType read_type;
/*DEAL WITH SETTING ATTRIBUTES HERE*/
switch(key) {
case SP_ATTR_TYPE:
@@ -205,15 +205,15 @@ sp_feColorMatrix_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape:
return repr;
}
-static void sp_feColorMatrix_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+static void sp_feColorMatrix_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
g_assert(primitive != NULL);
g_assert(filter != NULL);
SPFeColorMatrix *sp_colormatrix = SP_FECOLORMATRIX(primitive);
- int primitive_n = filter->add_primitive(NR::NR_FILTER_COLORMATRIX);
- NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
- NR::FilterColorMatrix *nr_colormatrix = dynamic_cast<NR::FilterColorMatrix*>(nr_primitive);
+ int primitive_n = filter->add_primitive(Inkscape::Filters::NR_FILTER_COLORMATRIX);
+ Inkscape::Filters::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+ Inkscape::Filters::FilterColorMatrix *nr_colormatrix = dynamic_cast<Inkscape::Filters::FilterColorMatrix*>(nr_primitive);
g_assert(nr_colormatrix != NULL);
sp_filter_primitive_renderer_common(primitive, nr_primitive);
diff --git a/src/filters/colormatrix.h b/src/filters/colormatrix.h
index 4b9eda1a7..69be96928 100644
--- a/src/filters/colormatrix.h
+++ b/src/filters/colormatrix.h
@@ -23,7 +23,7 @@ class SPFeColorMatrixClass;
struct SPFeColorMatrix : public SPFilterPrimitive {
/** COLORMATRIX ATTRIBUTES HERE */
- NR::FilterColorMatrixType type;
+ Inkscape::Filters::FilterColorMatrixType type;
gdouble value;
std::vector<gdouble> values;
};
diff --git a/src/filters/componenttransfer-funcnode.cpp b/src/filters/componenttransfer-funcnode.cpp
index 72a4e8744..a83dda1bb 100644
--- a/src/filters/componenttransfer-funcnode.cpp
+++ b/src/filters/componenttransfer-funcnode.cpp
@@ -146,7 +146,7 @@ sp_fefuncnode_class_init(SPFeFuncNodeClass *klass)
static void
sp_fefuncnode_init(SPFeFuncNode *fefuncnode)
{
- fefuncnode->type = NR::COMPONENTTRANSFER_TYPE_IDENTITY;
+ fefuncnode->type = Inkscape::Filters::COMPONENTTRANSFER_TYPE_IDENTITY;
//fefuncnode->tableValues = NULL;
fefuncnode->slope = 1;
fefuncnode->intercept = 0;
@@ -197,26 +197,26 @@ sp_fefuncnode_release(SPObject *object)
//TODO: release resources here
}
-static NR::FilterComponentTransferType sp_feComponenttransfer_read_type(gchar const *value){
- if (!value) return NR::COMPONENTTRANSFER_TYPE_ERROR; //type attribute is REQUIRED.
+static Inkscape::Filters::FilterComponentTransferType sp_feComponenttransfer_read_type(gchar const *value){
+ if (!value) return Inkscape::Filters::COMPONENTTRANSFER_TYPE_ERROR; //type attribute is REQUIRED.
switch(value[0]){
case 'i':
- if (strncmp(value, "identity", 8) == 0) return NR::COMPONENTTRANSFER_TYPE_IDENTITY;
+ if (strncmp(value, "identity", 8) == 0) return Inkscape::Filters::COMPONENTTRANSFER_TYPE_IDENTITY;
break;
case 't':
- if (strncmp(value, "table", 5) == 0) return NR::COMPONENTTRANSFER_TYPE_TABLE;
+ if (strncmp(value, "table", 5) == 0) return Inkscape::Filters::COMPONENTTRANSFER_TYPE_TABLE;
break;
case 'd':
- if (strncmp(value, "discrete", 8) == 0) return NR::COMPONENTTRANSFER_TYPE_DISCRETE;
+ if (strncmp(value, "discrete", 8) == 0) return Inkscape::Filters::COMPONENTTRANSFER_TYPE_DISCRETE;
break;
case 'l':
- if (strncmp(value, "linear", 6) == 0) return NR::COMPONENTTRANSFER_TYPE_LINEAR;
+ if (strncmp(value, "linear", 6) == 0) return Inkscape::Filters::COMPONENTTRANSFER_TYPE_LINEAR;
break;
case 'g':
- if (strncmp(value, "gamma", 5) == 0) return NR::COMPONENTTRANSFER_TYPE_GAMMA;
+ if (strncmp(value, "gamma", 5) == 0) return Inkscape::Filters::COMPONENTTRANSFER_TYPE_GAMMA;
break;
}
- return NR::COMPONENTTRANSFER_TYPE_ERROR; //type attribute is REQUIRED.
+ return Inkscape::Filters::COMPONENTTRANSFER_TYPE_ERROR; //type attribute is REQUIRED.
}
/**
@@ -226,7 +226,7 @@ static void
sp_fefuncnode_set(SPObject *object, unsigned int key, gchar const *value)
{
SPFeFuncNode *feFuncNode = SP_FEFUNCNODE(object);
- NR::FilterComponentTransferType type;
+ Inkscape::Filters::FilterComponentTransferType type;
double read_num;
switch(key) {
case SP_ATTR_TYPE:
diff --git a/src/filters/componenttransfer-funcnode.h b/src/filters/componenttransfer-funcnode.h
index 2f0b2fc28..4db6ab785 100644
--- a/src/filters/componenttransfer-funcnode.h
+++ b/src/filters/componenttransfer-funcnode.h
@@ -40,7 +40,7 @@ class SPFeFuncNode;
class SPFeFuncNodeClass;
struct SPFeFuncNode : public SPObject {
- NR::FilterComponentTransferType type;
+ Inkscape::Filters::FilterComponentTransferType type;
std::vector<double> tableValues;
double slope;
double intercept;
diff --git a/src/filters/componenttransfer.cpp b/src/filters/componenttransfer.cpp
index 603e1f4e5..162b67703 100644
--- a/src/filters/componenttransfer.cpp
+++ b/src/filters/componenttransfer.cpp
@@ -36,7 +36,7 @@ static void sp_feComponentTransfer_build(SPObject *object, SPDocument *document,
static void sp_feComponentTransfer_release(SPObject *object);
static void sp_feComponentTransfer_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feComponentTransfer_update(SPObject *object, SPCtx *ctx, guint flags);
-static void sp_feComponentTransfer_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter);
+static void sp_feComponentTransfer_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter);
static void sp_feComponentTransfer_remove_child(SPObject *object, Inkscape::XML::Node *child);
static void sp_feComponentTransfer_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
static Inkscape::XML::Node *sp_feComponentTransfer_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
@@ -130,7 +130,7 @@ static void sp_feComponentTransfer_children_modified(SPFeComponentTransfer *sp_c
// Set any types not explicitly set to the identity transform
for(int i=0;i<4;i++) {
if (!set[i]) {
- sp_componenttransfer->renderer->type[i] = NR::COMPONENTTRANSFER_TYPE_IDENTITY;
+ sp_componenttransfer->renderer->type[i] = Inkscape::Filters::COMPONENTTRANSFER_TYPE_IDENTITY;
}
}
}
@@ -238,15 +238,15 @@ sp_feComponentTransfer_write(SPObject *object, Inkscape::XML::Document *doc, Ink
return repr;
}
-static void sp_feComponentTransfer_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+static void sp_feComponentTransfer_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
g_assert(primitive != NULL);
g_assert(filter != NULL);
SPFeComponentTransfer *sp_componenttransfer = SP_FECOMPONENTTRANSFER(primitive);
- int primitive_n = filter->add_primitive(NR::NR_FILTER_COMPONENTTRANSFER);
- NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
- NR::FilterComponentTransfer *nr_componenttransfer = dynamic_cast<NR::FilterComponentTransfer*>(nr_primitive);
+ int primitive_n = filter->add_primitive(Inkscape::Filters::NR_FILTER_COMPONENTTRANSFER);
+ Inkscape::Filters::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+ Inkscape::Filters::FilterComponentTransfer *nr_componenttransfer = dynamic_cast<Inkscape::Filters::FilterComponentTransfer*>(nr_primitive);
g_assert(nr_componenttransfer != NULL);
sp_componenttransfer->renderer = nr_componenttransfer;
diff --git a/src/filters/componenttransfer.h b/src/filters/componenttransfer.h
index 515825d65..8281d9aea 100644
--- a/src/filters/componenttransfer.h
+++ b/src/filters/componenttransfer.h
@@ -24,7 +24,7 @@ class SPFeComponentTransferClass;
struct SPFeComponentTransfer : public SPFilterPrimitive {
/** COMPONENTTRANSFER ATTRIBUTES HERE */
- NR::FilterComponentTransfer *renderer;
+ Inkscape::Filters::FilterComponentTransfer *renderer;
};
struct SPFeComponentTransferClass {
diff --git a/src/filters/composite.cpp b/src/filters/composite.cpp
index 61658ba9e..707c74854 100644
--- a/src/filters/composite.cpp
+++ b/src/filters/composite.cpp
@@ -34,7 +34,7 @@ static void sp_feComposite_release(SPObject *object);
static void sp_feComposite_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feComposite_update(SPObject *object, SPCtx *ctx, guint flags);
static Inkscape::XML::Node *sp_feComposite_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static void sp_feComposite_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter);
+static void sp_feComposite_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter);
static SPFilterPrimitiveClass *feComposite_parent_class;
@@ -84,7 +84,7 @@ sp_feComposite_init(SPFeComposite *feComposite)
feComposite->k2 = 0;
feComposite->k3 = 0;
feComposite->k4 = 0;
- feComposite->in2 = NR::NR_FILTER_SLOT_NOT_SET;
+ feComposite->in2 = Inkscape::Filters::NR_FILTER_SLOT_NOT_SET;
}
/**
@@ -249,15 +249,15 @@ sp_feComposite_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::X
return repr;
}
-static void sp_feComposite_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+static void sp_feComposite_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
g_assert(primitive != NULL);
g_assert(filter != NULL);
SPFeComposite *sp_composite = SP_FECOMPOSITE(primitive);
- int primitive_n = filter->add_primitive(NR::NR_FILTER_COMPOSITE);
- NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
- NR::FilterComposite *nr_composite = dynamic_cast<NR::FilterComposite*>(nr_primitive);
+ int primitive_n = filter->add_primitive(Inkscape::Filters::NR_FILTER_COMPOSITE);
+ Inkscape::Filters::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+ Inkscape::Filters::FilterComposite *nr_composite = dynamic_cast<Inkscape::Filters::FilterComposite*>(nr_primitive);
g_assert(nr_composite != NULL);
sp_filter_primitive_renderer_common(primitive, nr_primitive);
diff --git a/src/filters/convolvematrix.cpp b/src/filters/convolvematrix.cpp
index a930bc4e7..41028fb20 100644
--- a/src/filters/convolvematrix.cpp
+++ b/src/filters/convolvematrix.cpp
@@ -39,7 +39,7 @@ static void sp_feConvolveMatrix_release(SPObject *object);
static void sp_feConvolveMatrix_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feConvolveMatrix_update(SPObject *object, SPCtx *ctx, guint flags);
static Inkscape::XML::Node *sp_feConvolveMatrix_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static void sp_feConvolveMatrix_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter);
+static void sp_feConvolveMatrix_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter);
static SPFilterPrimitiveClass *feConvolveMatrix_parent_class;
@@ -88,7 +88,7 @@ sp_feConvolveMatrix_init(SPFeConvolveMatrix *feConvolveMatrix)
feConvolveMatrix->order.set("3 3");
feConvolveMatrix->targetX = 1;
feConvolveMatrix->targetY = 1;
- feConvolveMatrix->edgeMode = NR::CONVOLVEMATRIX_EDGEMODE_DUPLICATE;
+ feConvolveMatrix->edgeMode = Inkscape::Filters::CONVOLVEMATRIX_EDGEMODE_DUPLICATE;
feConvolveMatrix->preserveAlpha = false;
//some helper variables:
@@ -131,20 +131,20 @@ sp_feConvolveMatrix_release(SPObject *object)
((SPObjectClass *) feConvolveMatrix_parent_class)->release(object);
}
-static NR::FilterConvolveMatrixEdgeMode sp_feConvolveMatrix_read_edgeMode(gchar const *value){
- if (!value) return NR::CONVOLVEMATRIX_EDGEMODE_DUPLICATE; //duplicate is default
+static Inkscape::Filters::FilterConvolveMatrixEdgeMode sp_feConvolveMatrix_read_edgeMode(gchar const *value){
+ if (!value) return Inkscape::Filters::CONVOLVEMATRIX_EDGEMODE_DUPLICATE; //duplicate is default
switch(value[0]){
case 'd':
- if (strncmp(value, "duplicate", 9) == 0) return NR::CONVOLVEMATRIX_EDGEMODE_DUPLICATE;
+ if (strncmp(value, "duplicate", 9) == 0) return Inkscape::Filters::CONVOLVEMATRIX_EDGEMODE_DUPLICATE;
break;
case 'w':
- if (strncmp(value, "wrap", 4) == 0) return NR::CONVOLVEMATRIX_EDGEMODE_WRAP;
+ if (strncmp(value, "wrap", 4) == 0) return Inkscape::Filters::CONVOLVEMATRIX_EDGEMODE_WRAP;
break;
case 'n':
- if (strncmp(value, "none", 4) == 0) return NR::CONVOLVEMATRIX_EDGEMODE_NONE;
+ if (strncmp(value, "none", 4) == 0) return Inkscape::Filters::CONVOLVEMATRIX_EDGEMODE_NONE;
break;
}
- return NR::CONVOLVEMATRIX_EDGEMODE_DUPLICATE; //duplicate is default
+ return Inkscape::Filters::CONVOLVEMATRIX_EDGEMODE_DUPLICATE; //duplicate is default
}
/**
@@ -158,7 +158,7 @@ sp_feConvolveMatrix_set(SPObject *object, unsigned int key, gchar const *value)
double read_num;
int read_int;
bool read_bool;
- NR::FilterConvolveMatrixEdgeMode read_mode;
+ Inkscape::Filters::FilterConvolveMatrixEdgeMode read_mode;
switch(key) {
/*DEAL WITH SETTING ATTRIBUTES HERE*/
@@ -303,15 +303,15 @@ sp_feConvolveMatrix_write(SPObject *object, Inkscape::XML::Document *doc, Inksca
return repr;
}
-static void sp_feConvolveMatrix_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+static void sp_feConvolveMatrix_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
g_assert(primitive != NULL);
g_assert(filter != NULL);
SPFeConvolveMatrix *sp_convolve = SP_FECONVOLVEMATRIX(primitive);
- int primitive_n = filter->add_primitive(NR::NR_FILTER_CONVOLVEMATRIX);
- NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
- NR::FilterConvolveMatrix *nr_convolve = dynamic_cast<NR::FilterConvolveMatrix*>(nr_primitive);
+ int primitive_n = filter->add_primitive(Inkscape::Filters::NR_FILTER_CONVOLVEMATRIX);
+ Inkscape::Filters::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+ Inkscape::Filters::FilterConvolveMatrix *nr_convolve = dynamic_cast<Inkscape::Filters::FilterConvolveMatrix*>(nr_primitive);
g_assert(nr_convolve != NULL);
sp_filter_primitive_renderer_common(primitive, nr_primitive);
diff --git a/src/filters/convolvematrix.h b/src/filters/convolvematrix.h
index 991f63988..beb5fad75 100644
--- a/src/filters/convolvematrix.h
+++ b/src/filters/convolvematrix.h
@@ -29,7 +29,7 @@ struct SPFeConvolveMatrix : public SPFilterPrimitive {
std::vector<gdouble> kernelMatrix;
double divisor, bias;
int targetX, targetY;
- NR::FilterConvolveMatrixEdgeMode edgeMode;
+ Inkscape::Filters::FilterConvolveMatrixEdgeMode edgeMode;
NumberOptNumber kernelUnitLength;
bool preserveAlpha;
//some helper variables:
diff --git a/src/filters/diffuselighting.cpp b/src/filters/diffuselighting.cpp
index a4935bf72..9c68006ed 100644
--- a/src/filters/diffuselighting.cpp
+++ b/src/filters/diffuselighting.cpp
@@ -46,7 +46,7 @@ static void sp_feDiffuseLighting_child_added(SPObject *object,
static void sp_feDiffuseLighting_remove_child(SPObject *object, Inkscape::XML::Node *child);
static void sp_feDiffuseLighting_order_changed(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref);
static Inkscape::XML::Node *sp_feDiffuseLighting_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static void sp_feDiffuseLighting_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter);
+static void sp_feDiffuseLighting_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter);
static void sp_feDiffuseLighting_children_modified(SPFeDiffuseLighting *sp_diffuselighting);
static SPFilterPrimitiveClass *feDiffuseLighting_parent_class;
@@ -321,31 +321,31 @@ sp_feDiffuseLighting_order_changed (SPObject *object, Inkscape::XML::Node *child
static void sp_feDiffuseLighting_children_modified(SPFeDiffuseLighting *sp_diffuselighting)
{
if (sp_diffuselighting->renderer) {
- sp_diffuselighting->renderer->light_type = NR::NO_LIGHT;
+ sp_diffuselighting->renderer->light_type = Inkscape::Filters::NO_LIGHT;
if (SP_IS_FEDISTANTLIGHT(sp_diffuselighting->children)) {
- sp_diffuselighting->renderer->light_type = NR::DISTANT_LIGHT;
+ sp_diffuselighting->renderer->light_type = Inkscape::Filters::DISTANT_LIGHT;
sp_diffuselighting->renderer->light.distant = SP_FEDISTANTLIGHT(sp_diffuselighting->children);
}
if (SP_IS_FEPOINTLIGHT(sp_diffuselighting->children)) {
- sp_diffuselighting->renderer->light_type = NR::POINT_LIGHT;
+ sp_diffuselighting->renderer->light_type = Inkscape::Filters::POINT_LIGHT;
sp_diffuselighting->renderer->light.point = SP_FEPOINTLIGHT(sp_diffuselighting->children);
}
if (SP_IS_FESPOTLIGHT(sp_diffuselighting->children)) {
- sp_diffuselighting->renderer->light_type = NR::SPOT_LIGHT;
+ sp_diffuselighting->renderer->light_type = Inkscape::Filters::SPOT_LIGHT;
sp_diffuselighting->renderer->light.spot = SP_FESPOTLIGHT(sp_diffuselighting->children);
}
}
}
-static void sp_feDiffuseLighting_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+static void sp_feDiffuseLighting_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
g_assert(primitive != NULL);
g_assert(filter != NULL);
SPFeDiffuseLighting *sp_diffuselighting = SP_FEDIFFUSELIGHTING(primitive);
- int primitive_n = filter->add_primitive(NR::NR_FILTER_DIFFUSELIGHTING);
- NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
- NR::FilterDiffuseLighting *nr_diffuselighting = dynamic_cast<NR::FilterDiffuseLighting*>(nr_primitive);
+ int primitive_n = filter->add_primitive(Inkscape::Filters::NR_FILTER_DIFFUSELIGHTING);
+ Inkscape::Filters::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+ Inkscape::Filters::FilterDiffuseLighting *nr_diffuselighting = dynamic_cast<Inkscape::Filters::FilterDiffuseLighting*>(nr_primitive);
g_assert(nr_diffuselighting != NULL);
sp_diffuselighting->renderer = nr_diffuselighting;
@@ -355,17 +355,17 @@ static void sp_feDiffuseLighting_build_renderer(SPFilterPrimitive *primitive, NR
nr_diffuselighting->surfaceScale = sp_diffuselighting->surfaceScale;
nr_diffuselighting->lighting_color = sp_diffuselighting->lighting_color;
//We assume there is at most one child
- nr_diffuselighting->light_type = NR::NO_LIGHT;
+ nr_diffuselighting->light_type = Inkscape::Filters::NO_LIGHT;
if (SP_IS_FEDISTANTLIGHT(primitive->children)) {
- nr_diffuselighting->light_type = NR::DISTANT_LIGHT;
+ nr_diffuselighting->light_type = Inkscape::Filters::DISTANT_LIGHT;
nr_diffuselighting->light.distant = SP_FEDISTANTLIGHT(primitive->children);
}
if (SP_IS_FEPOINTLIGHT(primitive->children)) {
- nr_diffuselighting->light_type = NR::POINT_LIGHT;
+ nr_diffuselighting->light_type = Inkscape::Filters::POINT_LIGHT;
nr_diffuselighting->light.point = SP_FEPOINTLIGHT(primitive->children);
}
if (SP_IS_FESPOTLIGHT(primitive->children)) {
- nr_diffuselighting->light_type = NR::SPOT_LIGHT;
+ nr_diffuselighting->light_type = Inkscape::Filters::SPOT_LIGHT;
nr_diffuselighting->light.spot = SP_FESPOTLIGHT(primitive->children);
}
diff --git a/src/filters/diffuselighting.h b/src/filters/diffuselighting.h
index 8e909f9ae..3c6c0ae73 100644
--- a/src/filters/diffuselighting.h
+++ b/src/filters/diffuselighting.h
@@ -18,9 +18,11 @@
#include "sp-filter.h"
#include "diffuselighting-fns.h"
-namespace NR {
+namespace Inkscape {
+namespace Filters {
class FilterDiffuseLighting;
}
+}
/* FeDiffuseLighting base class */
class SPFeDiffuseLightingClass;
@@ -39,7 +41,7 @@ struct SPFeDiffuseLighting : public SPFilterPrimitive {
guint32 lighting_color;
guint lighting_color_set : 1;
/** pointer to the associated renderer */
- NR::FilterDiffuseLighting *renderer;
+ Inkscape::Filters::FilterDiffuseLighting *renderer;
};
struct SPFeDiffuseLightingClass {
diff --git a/src/filters/displacementmap.cpp b/src/filters/displacementmap.cpp
index 405922b46..7d4100b0e 100644
--- a/src/filters/displacementmap.cpp
+++ b/src/filters/displacementmap.cpp
@@ -33,7 +33,7 @@ static void sp_feDisplacementMap_build(SPObject *object, SPDocument *document, I
static void sp_feDisplacementMap_release(SPObject *object);
static void sp_feDisplacementMap_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feDisplacementMap_update(SPObject *object, SPCtx *ctx, guint flags);
-static void sp_feDisplacementMap_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter);
+static void sp_feDisplacementMap_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter);
static Inkscape::XML::Node *sp_feDisplacementMap_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static SPFilterPrimitiveClass *feDisplacementMap_parent_class;
@@ -81,7 +81,7 @@ sp_feDisplacementMap_init(SPFeDisplacementMap *feDisplacementMap)
feDisplacementMap->scale=0;
feDisplacementMap->xChannelSelector = DISPLACEMENTMAP_CHANNEL_ALPHA;
feDisplacementMap->yChannelSelector = DISPLACEMENTMAP_CHANNEL_ALPHA;
- feDisplacementMap->in2 = NR::NR_FILTER_SLOT_NOT_SET;
+ feDisplacementMap->in2 = Inkscape::Filters::NR_FILTER_SLOT_NOT_SET;
}
/**
@@ -227,15 +227,15 @@ sp_feDisplacementMap_write(SPObject *object, Inkscape::XML::Document *doc, Inksc
return repr;
}
-static void sp_feDisplacementMap_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+static void sp_feDisplacementMap_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
g_assert(primitive != NULL);
g_assert(filter != NULL);
SPFeDisplacementMap *sp_displacement_map = SP_FEDISPLACEMENTMAP(primitive);
- int primitive_n = filter->add_primitive(NR::NR_FILTER_DISPLACEMENTMAP);
- NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
- NR::FilterDisplacementMap *nr_displacement_map = dynamic_cast<NR::FilterDisplacementMap*>(nr_primitive);
+ int primitive_n = filter->add_primitive(Inkscape::Filters::NR_FILTER_DISPLACEMENTMAP);
+ Inkscape::Filters::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+ Inkscape::Filters::FilterDisplacementMap *nr_displacement_map = dynamic_cast<Inkscape::Filters::FilterDisplacementMap*>(nr_primitive);
g_assert(nr_displacement_map != NULL);
sp_filter_primitive_renderer_common(primitive, nr_primitive);
diff --git a/src/filters/flood.cpp b/src/filters/flood.cpp
index 31aa9559a..003d174c1 100644
--- a/src/filters/flood.cpp
+++ b/src/filters/flood.cpp
@@ -34,7 +34,7 @@ static void sp_feFlood_release(SPObject *object);
static void sp_feFlood_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feFlood_update(SPObject *object, SPCtx *ctx, guint flags);
static Inkscape::XML::Node *sp_feFlood_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static void sp_feFlood_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter);
+static void sp_feFlood_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter);
static SPFilterPrimitiveClass *feFlood_parent_class;
@@ -196,16 +196,16 @@ sp_feFlood_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::
return repr;
}
-static void sp_feFlood_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+static void sp_feFlood_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
g_assert(primitive != NULL);
g_assert(filter != NULL);
SPFeFlood *sp_flood = SP_FEFLOOD(primitive);
(void)sp_flood;
- int primitive_n = filter->add_primitive(NR::NR_FILTER_FLOOD);
- NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
- NR::FilterFlood *nr_flood = dynamic_cast<NR::FilterFlood*>(nr_primitive);
+ int primitive_n = filter->add_primitive(Inkscape::Filters::NR_FILTER_FLOOD);
+ Inkscape::Filters::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+ Inkscape::Filters::FilterFlood *nr_flood = dynamic_cast<Inkscape::Filters::FilterFlood*>(nr_primitive);
g_assert(nr_flood != NULL);
sp_filter_primitive_renderer_common(primitive, nr_primitive);
diff --git a/src/filters/image.cpp b/src/filters/image.cpp
index d132d361c..f4764577a 100644
--- a/src/filters/image.cpp
+++ b/src/filters/image.cpp
@@ -39,7 +39,7 @@ static void sp_feImage_release(SPObject *object);
static void sp_feImage_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feImage_update(SPObject *object, SPCtx *ctx, guint flags);
static Inkscape::XML::Node *sp_feImage_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static void sp_feImage_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter);
+static void sp_feImage_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter);
static SPFilterPrimitiveClass *feImage_parent_class;
@@ -232,15 +232,15 @@ sp_feImage_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::
return repr;
}
-static void sp_feImage_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+static void sp_feImage_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
g_assert(primitive != NULL);
g_assert(filter != NULL);
SPFeImage *sp_image = SP_FEIMAGE(primitive);
- int primitive_n = filter->add_primitive(NR::NR_FILTER_IMAGE);
- NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
- NR::FilterImage *nr_image = dynamic_cast<NR::FilterImage*>(nr_primitive);
+ int primitive_n = filter->add_primitive(Inkscape::Filters::NR_FILTER_IMAGE);
+ Inkscape::Filters::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+ Inkscape::Filters::FilterImage *nr_image = dynamic_cast<Inkscape::Filters::FilterImage*>(nr_primitive);
g_assert(nr_image != NULL);
sp_filter_primitive_renderer_common(primitive, nr_primitive);
diff --git a/src/filters/merge.cpp b/src/filters/merge.cpp
index 079d1b19c..a1f17889d 100644
--- a/src/filters/merge.cpp
+++ b/src/filters/merge.cpp
@@ -35,7 +35,7 @@ static void sp_feMerge_release(SPObject *object);
static void sp_feMerge_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feMerge_update(SPObject *object, SPCtx *ctx, guint flags);
static Inkscape::XML::Node *sp_feMerge_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static void sp_feMerge_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter);
+static void sp_feMerge_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter);
static SPFilterPrimitiveClass *feMerge_parent_class;
@@ -164,16 +164,16 @@ sp_feMerge_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::
return repr;
}
-static void sp_feMerge_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+static void sp_feMerge_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
g_assert(primitive != NULL);
g_assert(filter != NULL);
SPFeMerge *sp_merge = SP_FEMERGE(primitive);
(void)sp_merge;
- int primitive_n = filter->add_primitive(NR::NR_FILTER_MERGE);
- NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
- NR::FilterMerge *nr_merge = dynamic_cast<NR::FilterMerge*>(nr_primitive);
+ int primitive_n = filter->add_primitive(Inkscape::Filters::NR_FILTER_MERGE);
+ Inkscape::Filters::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+ Inkscape::Filters::FilterMerge *nr_merge = dynamic_cast<Inkscape::Filters::FilterMerge*>(nr_primitive);
g_assert(nr_merge != NULL);
sp_filter_primitive_renderer_common(primitive, nr_primitive);
diff --git a/src/filters/mergenode.cpp b/src/filters/mergenode.cpp
index 1f056a25f..8a4e0dd0a 100644
--- a/src/filters/mergenode.cpp
+++ b/src/filters/mergenode.cpp
@@ -73,7 +73,7 @@ sp_feMergeNode_class_init(SPFeMergeNodeClass *klass)
static void
sp_feMergeNode_init(SPFeMergeNode *feMergeNode)
{
- feMergeNode->input = NR::NR_FILTER_SLOT_NOT_SET;
+ feMergeNode->input = Inkscape::Filters::NR_FILTER_SLOT_NOT_SET;
}
/**
diff --git a/src/filters/morphology.cpp b/src/filters/morphology.cpp
index 927616091..679221626 100644
--- a/src/filters/morphology.cpp
+++ b/src/filters/morphology.cpp
@@ -36,7 +36,7 @@ static void sp_feMorphology_release(SPObject *object);
static void sp_feMorphology_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feMorphology_update(SPObject *object, SPCtx *ctx, guint flags);
static Inkscape::XML::Node *sp_feMorphology_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static void sp_feMorphology_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter);
+static void sp_feMorphology_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter);
static SPFilterPrimitiveClass *feMorphology_parent_class;
@@ -111,17 +111,17 @@ sp_feMorphology_release(SPObject *object)
((SPObjectClass *) feMorphology_parent_class)->release(object);
}
-static NR::FilterMorphologyOperator sp_feMorphology_read_operator(gchar const *value){
- if (!value) return NR::MORPHOLOGY_OPERATOR_ERODE; //erode is default
+static Inkscape::Filters::FilterMorphologyOperator sp_feMorphology_read_operator(gchar const *value){
+ if (!value) return Inkscape::Filters::MORPHOLOGY_OPERATOR_ERODE; //erode is default
switch(value[0]){
case 'e':
- if (strncmp(value, "erode", 5) == 0) return NR::MORPHOLOGY_OPERATOR_ERODE;
+ if (strncmp(value, "erode", 5) == 0) return Inkscape::Filters::MORPHOLOGY_OPERATOR_ERODE;
break;
case 'd':
- if (strncmp(value, "dilate", 6) == 0) return NR::MORPHOLOGY_OPERATOR_DILATE;
+ if (strncmp(value, "dilate", 6) == 0) return Inkscape::Filters::MORPHOLOGY_OPERATOR_DILATE;
break;
}
- return NR::MORPHOLOGY_OPERATOR_ERODE; //erode is default
+ return Inkscape::Filters::MORPHOLOGY_OPERATOR_ERODE; //erode is default
}
/**
@@ -133,7 +133,7 @@ sp_feMorphology_set(SPObject *object, unsigned int key, gchar const *value)
SPFeMorphology *feMorphology = SP_FEMORPHOLOGY(object);
(void)feMorphology;
- NR::FilterMorphologyOperator read_operator;
+ Inkscape::Filters::FilterMorphologyOperator read_operator;
switch(key) {
/*DEAL WITH SETTING ATTRIBUTES HERE*/
case SP_ATTR_OPERATOR:
@@ -199,15 +199,15 @@ sp_feMorphology_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::
return repr;
}
-static void sp_feMorphology_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+static void sp_feMorphology_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
g_assert(primitive != NULL);
g_assert(filter != NULL);
SPFeMorphology *sp_morphology = SP_FEMORPHOLOGY(primitive);
- int primitive_n = filter->add_primitive(NR::NR_FILTER_MORPHOLOGY);
- NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
- NR::FilterMorphology *nr_morphology = dynamic_cast<NR::FilterMorphology*>(nr_primitive);
+ int primitive_n = filter->add_primitive(Inkscape::Filters::NR_FILTER_MORPHOLOGY);
+ Inkscape::Filters::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+ Inkscape::Filters::FilterMorphology *nr_morphology = dynamic_cast<Inkscape::Filters::FilterMorphology*>(nr_primitive);
g_assert(nr_morphology != NULL);
sp_filter_primitive_renderer_common(primitive, nr_primitive);
diff --git a/src/filters/morphology.h b/src/filters/morphology.h
index 8e807d73a..20abf8a8d 100644
--- a/src/filters/morphology.h
+++ b/src/filters/morphology.h
@@ -25,7 +25,7 @@ class SPFeMorphologyClass;
struct SPFeMorphology : public SPFilterPrimitive {
/** MORPHOLOGY ATTRIBUTES HERE */
- NR::FilterMorphologyOperator Operator;
+ Inkscape::Filters::FilterMorphologyOperator Operator;
NumberOptNumber radius;
};
diff --git a/src/filters/offset.cpp b/src/filters/offset.cpp
index 084863612..2c01549d3 100644
--- a/src/filters/offset.cpp
+++ b/src/filters/offset.cpp
@@ -35,7 +35,7 @@ static void sp_feOffset_release(SPObject *object);
static void sp_feOffset_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feOffset_update(SPObject *object, SPCtx *ctx, guint flags);
static Inkscape::XML::Node *sp_feOffset_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static void sp_feOffset_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter);
+static void sp_feOffset_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter);
static SPFilterPrimitiveClass *feOffset_parent_class;
@@ -184,15 +184,15 @@ sp_feOffset_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML:
return repr;
}
-static void sp_feOffset_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+static void sp_feOffset_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
g_assert(primitive != NULL);
g_assert(filter != NULL);
SPFeOffset *sp_offset = SP_FEOFFSET(primitive);
- int primitive_n = filter->add_primitive(NR::NR_FILTER_OFFSET);
- NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
- NR::FilterOffset *nr_offset = dynamic_cast<NR::FilterOffset*>(nr_primitive);
+ int primitive_n = filter->add_primitive(Inkscape::Filters::NR_FILTER_OFFSET);
+ Inkscape::Filters::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+ Inkscape::Filters::FilterOffset *nr_offset = dynamic_cast<Inkscape::Filters::FilterOffset*>(nr_primitive);
g_assert(nr_offset != NULL);
sp_filter_primitive_renderer_common(primitive, nr_primitive);
diff --git a/src/filters/specularlighting.cpp b/src/filters/specularlighting.cpp
index baf9bb7c2..4c73033e6 100644
--- a/src/filters/specularlighting.cpp
+++ b/src/filters/specularlighting.cpp
@@ -46,7 +46,7 @@ static void sp_feSpecularLighting_child_added(SPObject *object,
static void sp_feSpecularLighting_remove_child(SPObject *object, Inkscape::XML::Node *child);
static void sp_feSpecularLighting_order_changed(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref);
static Inkscape::XML::Node *sp_feSpecularLighting_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static void sp_feSpecularLighting_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter);
+static void sp_feSpecularLighting_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter);
static void sp_feSpecularLighting_children_modified(SPFeSpecularLighting *sp_specularlighting);
static SPFilterPrimitiveClass *feSpecularLighting_parent_class;
@@ -343,31 +343,31 @@ sp_feSpecularLighting_order_changed (SPObject *object, Inkscape::XML::Node *chil
static void sp_feSpecularLighting_children_modified(SPFeSpecularLighting *sp_specularlighting)
{
if (sp_specularlighting->renderer) {
- sp_specularlighting->renderer->light_type = NR::NO_LIGHT;
+ sp_specularlighting->renderer->light_type = Inkscape::Filters::NO_LIGHT;
if (SP_IS_FEDISTANTLIGHT(sp_specularlighting->children)) {
- sp_specularlighting->renderer->light_type = NR::DISTANT_LIGHT;
+ sp_specularlighting->renderer->light_type = Inkscape::Filters::DISTANT_LIGHT;
sp_specularlighting->renderer->light.distant = SP_FEDISTANTLIGHT(sp_specularlighting->children);
}
if (SP_IS_FEPOINTLIGHT(sp_specularlighting->children)) {
- sp_specularlighting->renderer->light_type = NR::POINT_LIGHT;
+ sp_specularlighting->renderer->light_type = Inkscape::Filters::POINT_LIGHT;
sp_specularlighting->renderer->light.point = SP_FEPOINTLIGHT(sp_specularlighting->children);
}
if (SP_IS_FESPOTLIGHT(sp_specularlighting->children)) {
- sp_specularlighting->renderer->light_type = NR::SPOT_LIGHT;
+ sp_specularlighting->renderer->light_type = Inkscape::Filters::SPOT_LIGHT;
sp_specularlighting->renderer->light.spot = SP_FESPOTLIGHT(sp_specularlighting->children);
}
}
}
-static void sp_feSpecularLighting_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+static void sp_feSpecularLighting_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
g_assert(primitive != NULL);
g_assert(filter != NULL);
SPFeSpecularLighting *sp_specularlighting = SP_FESPECULARLIGHTING(primitive);
- int primitive_n = filter->add_primitive(NR::NR_FILTER_SPECULARLIGHTING);
- NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
- NR::FilterSpecularLighting *nr_specularlighting = dynamic_cast<NR::FilterSpecularLighting*>(nr_primitive);
+ int primitive_n = filter->add_primitive(Inkscape::Filters::NR_FILTER_SPECULARLIGHTING);
+ Inkscape::Filters::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+ Inkscape::Filters::FilterSpecularLighting *nr_specularlighting = dynamic_cast<Inkscape::Filters::FilterSpecularLighting*>(nr_primitive);
g_assert(nr_specularlighting != NULL);
sp_specularlighting->renderer = nr_specularlighting;
@@ -378,17 +378,17 @@ static void sp_feSpecularLighting_build_renderer(SPFilterPrimitive *primitive, N
nr_specularlighting->surfaceScale = sp_specularlighting->surfaceScale;
nr_specularlighting->lighting_color = sp_specularlighting->lighting_color;
//We assume there is at most one child
- nr_specularlighting->light_type = NR::NO_LIGHT;
+ nr_specularlighting->light_type = Inkscape::Filters::NO_LIGHT;
if (SP_IS_FEDISTANTLIGHT(primitive->children)) {
- nr_specularlighting->light_type = NR::DISTANT_LIGHT;
+ nr_specularlighting->light_type = Inkscape::Filters::DISTANT_LIGHT;
nr_specularlighting->light.distant = SP_FEDISTANTLIGHT(primitive->children);
}
if (SP_IS_FEPOINTLIGHT(primitive->children)) {
- nr_specularlighting->light_type = NR::POINT_LIGHT;
+ nr_specularlighting->light_type = Inkscape::Filters::POINT_LIGHT;
nr_specularlighting->light.point = SP_FEPOINTLIGHT(primitive->children);
}
if (SP_IS_FESPOTLIGHT(primitive->children)) {
- nr_specularlighting->light_type = NR::SPOT_LIGHT;
+ nr_specularlighting->light_type = Inkscape::Filters::SPOT_LIGHT;
nr_specularlighting->light.spot = SP_FESPOTLIGHT(primitive->children);
}
diff --git a/src/filters/specularlighting.h b/src/filters/specularlighting.h
index c2a55df51..cdca5f99f 100644
--- a/src/filters/specularlighting.h
+++ b/src/filters/specularlighting.h
@@ -18,9 +18,11 @@
#include "sp-filter.h"
#include "specularlighting-fns.h"
-namespace NR {
+namespace Inkscape {
+namespace Filters {
class FilterSpecularLighting;
}
+}
/* FeSpecularLighting base class */
class SPFeSpecularLightingClass;
@@ -42,7 +44,7 @@ struct SPFeSpecularLighting : public SPFilterPrimitive {
guint32 lighting_color;
guint lighting_color_set : 1;
- NR::FilterSpecularLighting *renderer;
+ Inkscape::Filters::FilterSpecularLighting *renderer;
};
struct SPFeSpecularLightingClass {
diff --git a/src/filters/tile.cpp b/src/filters/tile.cpp
index ab4f9a27a..cf72cb052 100644
--- a/src/filters/tile.cpp
+++ b/src/filters/tile.cpp
@@ -33,7 +33,7 @@ static void sp_feTile_release(SPObject *object);
static void sp_feTile_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feTile_update(SPObject *object, SPCtx *ctx, guint flags);
static Inkscape::XML::Node *sp_feTile_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static void sp_feTile_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter);
+static void sp_feTile_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter);
static SPFilterPrimitiveClass *feTile_parent_class;
@@ -164,16 +164,16 @@ sp_feTile_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::N
return repr;
}
-static void sp_feTile_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+static void sp_feTile_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
g_assert(primitive != NULL);
g_assert(filter != NULL);
SPFeTile *sp_tile = SP_FETILE(primitive);
(void)sp_tile;
- int primitive_n = filter->add_primitive(NR::NR_FILTER_TILE);
- NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
- NR::FilterTile *nr_tile = dynamic_cast<NR::FilterTile*>(nr_primitive);
+ int primitive_n = filter->add_primitive(Inkscape::Filters::NR_FILTER_TILE);
+ Inkscape::Filters::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+ Inkscape::Filters::FilterTile *nr_tile = dynamic_cast<Inkscape::Filters::FilterTile*>(nr_primitive);
g_assert(nr_tile != NULL);
sp_filter_primitive_renderer_common(primitive, nr_primitive);
diff --git a/src/filters/turbulence.cpp b/src/filters/turbulence.cpp
index 1d7a1c840..7c185f2af 100644
--- a/src/filters/turbulence.cpp
+++ b/src/filters/turbulence.cpp
@@ -39,7 +39,7 @@ static void sp_feTurbulence_release(SPObject *object);
static void sp_feTurbulence_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feTurbulence_update(SPObject *object, SPCtx *ctx, guint flags);
static Inkscape::XML::Node *sp_feTurbulence_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static void sp_feTurbulence_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter);
+static void sp_feTurbulence_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter);
static SPFilterPrimitiveClass *feTurbulence_parent_class;
@@ -130,17 +130,17 @@ static bool sp_feTurbulence_read_stitchTiles(gchar const *value){
return false; // 'noStitch' is default
}
-static NR::FilterTurbulenceType sp_feTurbulence_read_type(gchar const *value){
- if (!value) return NR::TURBULENCE_TURBULENCE; // 'turbulence' is default
+static Inkscape::Filters::FilterTurbulenceType sp_feTurbulence_read_type(gchar const *value){
+ if (!value) return Inkscape::Filters::TURBULENCE_TURBULENCE; // 'turbulence' is default
switch(value[0]){
case 'f':
- if (strncmp(value, "fractalNoise", 12) == 0) return NR::TURBULENCE_FRACTALNOISE;
+ if (strncmp(value, "fractalNoise", 12) == 0) return Inkscape::Filters::TURBULENCE_FRACTALNOISE;
break;
case 't':
- if (strncmp(value, "turbulence", 10) == 0) return NR::TURBULENCE_TURBULENCE;
+ if (strncmp(value, "turbulence", 10) == 0) return Inkscape::Filters::TURBULENCE_TURBULENCE;
break;
}
- return NR::TURBULENCE_TURBULENCE; // 'turbulence' is default
+ return Inkscape::Filters::TURBULENCE_TURBULENCE; // 'turbulence' is default
}
/**
@@ -155,7 +155,7 @@ sp_feTurbulence_set(SPObject *object, unsigned int key, gchar const *value)
int read_int;
double read_num;
bool read_bool;
- NR::FilterTurbulenceType read_type;
+ Inkscape::Filters::FilterTurbulenceType read_type;
switch(key) {
/*DEAL WITH SETTING ATTRIBUTES HERE*/
@@ -249,15 +249,15 @@ sp_feTurbulence_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::
return repr;
}
-static void sp_feTurbulence_build_renderer(SPFilterPrimitive *primitive, NR::Filter *filter) {
+static void sp_feTurbulence_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
g_assert(primitive != NULL);
g_assert(filter != NULL);
SPFeTurbulence *sp_turbulence = SP_FETURBULENCE(primitive);
- int primitive_n = filter->add_primitive(NR::NR_FILTER_TURBULENCE);
- NR::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
- NR::FilterTurbulence *nr_turbulence = dynamic_cast<NR::FilterTurbulence*>(nr_primitive);
+ int primitive_n = filter->add_primitive(Inkscape::Filters::NR_FILTER_TURBULENCE);
+ Inkscape::Filters::FilterPrimitive *nr_primitive = filter->get_primitive(primitive_n);
+ Inkscape::Filters::FilterTurbulence *nr_turbulence = dynamic_cast<Inkscape::Filters::FilterTurbulence*>(nr_primitive);
g_assert(nr_turbulence != NULL);
sp_filter_primitive_renderer_common(primitive, nr_primitive);
diff --git a/src/filters/turbulence.h b/src/filters/turbulence.h
index 3601a7cdc..5edf678a7 100644
--- a/src/filters/turbulence.h
+++ b/src/filters/turbulence.h
@@ -28,7 +28,7 @@ struct SPFeTurbulence : public SPFilterPrimitive {
int numOctaves;
double seed;
bool stitchTiles;
- NR::FilterTurbulenceType type;
+ Inkscape::Filters::FilterTurbulenceType type;
SVGLength x, y, height, width;
bool updated;
};