Code

warning cleanup
[inkscape.git] / src / live_effects / lpe-patternalongpath.cpp
index d36050a7fe01e38cd07149983b223b3896f8f95d..30ec589afc2162bd5625efd3f424028d46262b2d 100644 (file)
@@ -7,10 +7,11 @@
  */
 
 #include "live_effects/lpe-patternalongpath.h"
+#include "live_effects/lpeobject.h"
 #include "sp-shape.h"
 #include "display/curve.h"
 #include <libnr/n-art-bpath.h>
-#include "live_effects/n-art-bpath-2geom.h"
+#include "libnr/n-art-bpath-2geom.h"
 #include "svg/svg.h"
 #include "ui/widget/scalar.h"
 
@@ -98,7 +99,7 @@ LPEPatternAlongPath::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > con
 
     PAPCopyType type = copytype.get_value();
 
-    D2<Piecewise<SBasis> > patternd2 = make_cuts_independant(pattern.get_pwd2());
+    D2<Piecewise<SBasis> > patternd2 = make_cuts_independent(pattern.get_pwd2());
     Piecewise<SBasis> x0 = vertical_pattern.get_value() ? Piecewise<SBasis>(patternd2[1]) : Piecewise<SBasis>(patternd2[0]);
     Piecewise<SBasis> y0 = vertical_pattern.get_value() ? Piecewise<SBasis>(patternd2[0]) : Piecewise<SBasis>(patternd2[1]);
     Interval pattBndsX = bounds_exact(x0);
@@ -144,7 +145,7 @@ LPEPatternAlongPath::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > con
         double scaling = 1;
         switch(type) {
             case PAPCT_REPEATED:
-                nbCopies = floor((uskeleton.domain().extent() - toffset + xspace)/(pattBndsX.extent()+xspace));
+                nbCopies = static_cast<int>(floor((uskeleton.domain().extent() - toffset + xspace)/(pattBndsX.extent()+xspace)));
                 pattBndsX = Interval(pattBndsX.min(),pattBndsX.max()+xspace);
                 break;
                 
@@ -160,12 +161,12 @@ LPEPatternAlongPath::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > con
             case PAPCT_REPEATED_STRETCHED:
                 // if uskeleton is closed:
                 if(path_i.segs.front().at0() == path_i.segs.back().at1()){
-                    nbCopies = std::floor((uskeleton.domain().extent() - toffset)/(pattBndsX.extent()+xspace));
+                    nbCopies = static_cast<int>(std::floor((uskeleton.domain().extent() - toffset)/(pattBndsX.extent()+xspace)));
                     pattBndsX = Interval(pattBndsX.min(),pattBndsX.max()+xspace);
                     scaling = (uskeleton.domain().extent() - toffset)/(((double)nbCopies)*pattBndsX.extent());
                     // if not closed: no space at the end
                 }else{
-                    nbCopies = std::floor((uskeleton.domain().extent() - toffset + xspace)/(pattBndsX.extent()+xspace));
+                    nbCopies = static_cast<int>(std::floor((uskeleton.domain().extent() - toffset + xspace)/(pattBndsX.extent()+xspace)));
                     pattBndsX = Interval(pattBndsX.min(),pattBndsX.max()+xspace);
                     scaling = (uskeleton.domain().extent() - toffset)/(((double)nbCopies)*pattBndsX.extent() - xspace);
                 }
@@ -203,6 +204,9 @@ LPEPatternAlongPath::transform_multiply(Geom::Matrix const& postmul, bool set)
     Effect::transform_multiply(postmul, set);
 }
 
+LPEFreehandShape::LPEFreehandShape(LivePathEffectObject *lpeobject) : LPEPatternAlongPath(lpeobject)
+{
+}
 
 } // namespace LivePathEffect
 } /* namespace Inkscape */