From: kiirala Date: Thu, 22 Jun 2006 08:07:44 +0000 (+0000) Subject: Added virtual destructors for filter primitives. Corrected X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a72861cd83f11ef8b1247abca181a3ad31df0307;p=inkscape.git Added virtual destructors for filter primitives. Corrected attributes-test: filterRes, filterUnits, primitiveUnits and stdDeviation are now recognized. --- diff --git a/src/attributes-test.h b/src/attributes-test.h index 8bf6c70cb..c71b8f04c 100644 --- a/src/attributes-test.h +++ b/src/attributes-test.h @@ -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}, diff --git a/src/display/nr-filter-gaussian.cpp b/src/display/nr-filter-gaussian.cpp index e31d903f1..255627fa1 100644 --- a/src/display/nr-filter-gaussian.cpp +++ b/src/display/nr-filter-gaussian.cpp @@ -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); diff --git a/src/display/nr-filter-gaussian.h b/src/display/nr-filter-gaussian.h index 445364a6c..c3bf398c9 100644 --- a/src/display/nr-filter-gaussian.h +++ b/src/display/nr-filter-gaussian.h @@ -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); diff --git a/src/display/nr-filter-primitive.cpp b/src/display/nr-filter-primitive.cpp index 6bdbf9a41..e69a499d4 100644 --- a/src/display/nr-filter-primitive.cpp +++ b/src/display/nr-filter-primitive.cpp @@ -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); diff --git a/src/display/nr-filter-primitive.h b/src/display/nr-filter-primitive.h index 4a7bdb140..64625f4c2 100644 --- a/src/display/nr-filter-primitive.h +++ b/src/display/nr-filter-primitive.h @@ -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);