Code

Fix ef spam when adjusting pattern on text - patch from Adonis Papaderos
[inkscape.git] / src / filter-chemistry.cpp
index 1681831c2bacf85555dc6ba2b37c8e7d188eb31c..63e618dcf8fc2f297a2d98cbb7328ea1f922f191 100644 (file)
@@ -115,7 +115,7 @@ SPFilter *new_filter(SPDocument *document)
 }
 
 SPFilterPrimitive *
-filter_add_primitive(SPFilter *filter, const NR::FilterPrimitiveType type)
+filter_add_primitive(SPFilter *filter, const Inkscape::Filters::FilterPrimitiveType type)
 {
     Inkscape::XML::Document *xml_doc = sp_document_repr_doc(filter->document);
 
@@ -125,43 +125,43 @@ filter_add_primitive(SPFilter *filter, const NR::FilterPrimitiveType type)
 
     // set default values
     switch(type) {
-        case NR::NR_FILTER_BLEND:
+        case Inkscape::Filters::NR_FILTER_BLEND:
             repr->setAttribute("blend", "normal");
             break;
-        case NR::NR_FILTER_COLORMATRIX:
+        case Inkscape::Filters::NR_FILTER_COLORMATRIX:
             break;
-        case NR::NR_FILTER_COMPONENTTRANSFER:
+        case Inkscape::Filters::NR_FILTER_COMPONENTTRANSFER:
             break;
-        case NR::NR_FILTER_COMPOSITE:
+        case Inkscape::Filters::NR_FILTER_COMPOSITE:
             break;
-        case NR::NR_FILTER_CONVOLVEMATRIX:
+        case Inkscape::Filters::NR_FILTER_CONVOLVEMATRIX:
             repr->setAttribute("order", "3 3");
             repr->setAttribute("kernelMatrix", "0 0 0 0 0 0 0 0 0");
             break;
-        case NR::NR_FILTER_DIFFUSELIGHTING:
+        case Inkscape::Filters::NR_FILTER_DIFFUSELIGHTING:
             break;
-        case NR::NR_FILTER_DISPLACEMENTMAP:
+        case Inkscape::Filters::NR_FILTER_DISPLACEMENTMAP:
             break;
-        case NR::NR_FILTER_FLOOD:
+        case Inkscape::Filters::NR_FILTER_FLOOD:
             break;
-        case NR::NR_FILTER_GAUSSIANBLUR:
+        case Inkscape::Filters::NR_FILTER_GAUSSIANBLUR:
             repr->setAttribute("stdDeviation", "1");
             break;
-        case NR::NR_FILTER_IMAGE:
+        case Inkscape::Filters::NR_FILTER_IMAGE:
             break;
-        case NR::NR_FILTER_MERGE:
+        case Inkscape::Filters::NR_FILTER_MERGE:
             break;
-        case NR::NR_FILTER_MORPHOLOGY:
+        case Inkscape::Filters::NR_FILTER_MORPHOLOGY:
             break;
-        case NR::NR_FILTER_OFFSET:
+        case Inkscape::Filters::NR_FILTER_OFFSET:
             repr->setAttribute("dx", "0");
             repr->setAttribute("dy", "0");
             break;
-        case NR::NR_FILTER_SPECULARLIGHTING:
+        case Inkscape::Filters::NR_FILTER_SPECULARLIGHTING:
             break;
-        case NR::NR_FILTER_TILE:
+        case Inkscape::Filters::NR_FILTER_TILE:
             break;
-        case NR::NR_FILTER_TURBULENCE:
+        case Inkscape::Filters::NR_FILTER_TURBULENCE:
             break;
         default:
             break;
@@ -367,8 +367,8 @@ modify_filter_gaussian_blur_from_item(SPDocument *document, SPItem *item,
     }
 
     // Determine the required standard deviation value
-    NR::Matrix i2d (sp_item_i2d_affine (item));
-    double expansion = NR::expansion(i2d);
+    Geom::Matrix i2d (sp_item_i2d_affine (item));
+    double expansion = i2d.descrim();
     double stdDeviation = radius;
     if (expansion != 0)
         stdDeviation /= expansion;
@@ -386,8 +386,8 @@ modify_filter_gaussian_blur_from_item(SPDocument *document, SPItem *item,
 
     // Set the filter effects area
     Inkscape::XML::Node *repr = SP_OBJECT_REPR(item->style->getFilter());
-    set_filter_area(repr, radius, expansion, NR::expansionX(i2d),
-                    NR::expansionY(i2d), width, height);
+    set_filter_area(repr, radius, expansion, i2d.expansionX(),
+                    i2d.expansionY(), width, height);
 
     // Search for gaussian blur primitives. If found, set the stdDeviation
     // of the first one and return.
@@ -492,4 +492,4 @@ double get_single_gaussian_blur_radius(SPFilter *filter)
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :