Code

Added virtual destructors for filter primitives. Corrected
authorkiirala <kiirala@users.sourceforge.net>
Thu, 22 Jun 2006 08:07:44 +0000 (08:07 +0000)
committerkiirala <kiirala@users.sourceforge.net>
Thu, 22 Jun 2006 08:07:44 +0000 (08:07 +0000)
attributes-test: filterRes, filterUnits, primitiveUnits and stdDeviation
are now recognized.

src/attributes-test.h
src/display/nr-filter-gaussian.cpp
src/display/nr-filter-gaussian.h
src/display/nr-filter-primitive.cpp
src/display/nr-filter-primitive.h

index 8bf6c70cb13cc382b775940ec52327714b7cf494..c71b8f04caf730d6f88e02109915070934bcfa88 100644 (file)
@@ -105,8 +105,8 @@ struct {char const *attr; bool supported;} const all_attrs[] = {
     {"fill-opacity", true},
     {"fill-rule", true},
     {"filter", true},
-    {"filterRes", false},
-    {"filterUnits", false},
+    {"filterRes", true},
+    {"filterUnits", true},
     {"flood-color", true},
     {"flood-opacity", true},
     {"font-family", true},
@@ -214,7 +214,7 @@ struct {char const *attr; bool supported;} const all_attrs[] = {
     {"pointsAtZ", false},
     {"preserveAlpha", false},
     {"preserveAspectRatio", true},
-    {"primitiveUnits", false},
+    {"primitiveUnits", true},
     {"r", true},
     {"radius", false},
     {"refX", true},
@@ -238,7 +238,7 @@ struct {char const *attr; bool supported;} const all_attrs[] = {
     {"specularExponent", false},
     {"spreadMethod", true},
     {"startOffset", true},
-    {"stdDeviation", false},
+    {"stdDeviation", true},
     {"stemh", false},
     {"stemv", false},
     {"stitchTiles", false},
index e31d903f1fa271a90a13ab11aa263c4ff6fb2063..255627fa173e6cc3115411351a819a5f6addca59 100644 (file)
@@ -33,6 +33,11 @@ FilterPrimitive *FilterGaussian::create()
     return new FilterGaussian();
 }
 
+FilterGaussian::~FilterGaussian()
+{
+    // Nothing to do here
+}
+
 int FilterGaussian::_kernel_size(Matrix const &trans)
 {
     int length_x = _effect_area_scr_x(trans);
index 445364a6cff89eaaaaa0e6210516d036b62319b6..c3bf398c99f4bbf376d2dc013bf3e9ace59f73d1 100644 (file)
@@ -22,6 +22,7 @@ class FilterGaussian : public FilterPrimitive {
 public:
     FilterGaussian();
     static FilterPrimitive *create();
+    virtual ~FilterGaussian();
 
     virtual int render(NRPixBlock **pb, Matrix const &trans);
     virtual int get_enlarge(Matrix const &m);
index 6bdbf9a41a3d5ccb7e0340e72ac473831cc7c0d7..e69a499d46beea4c15d7d872015a512ceff249f1 100644 (file)
@@ -29,6 +29,11 @@ FilterPrimitive::FilterPrimitive()
     _region_height.set(SVGLength::PERCENT, 100, 0);
 }
 
+FilterPrimitive::~FilterPrimitive()
+{
+    // Nothing to do here
+}
+
 int FilterPrimitive::render(NRPixBlock **pb, NRMatrix const *trans) {
     if(trans) {
         return this->render(pb, *trans);
index 4a7bdb140faa0f5d3b3102c033ed158ee8cbf485..64625f4c22e3d153b9c5de2028a92d0bdfbda509 100644 (file)
@@ -21,8 +21,8 @@ namespace NR {
 class FilterPrimitive {
 public:
     FilterPrimitive();
-    virtual ~FilterPrimitive()
-        {}
+    virtual ~FilterPrimitive();
+
     int render(NRPixBlock **pb, NRMatrix const *trans);
     virtual int render(NRPixBlock **pb, Matrix const &trans) = 0;
     virtual int get_enlarge(Matrix const &m);