Author: Carlos Lopez <[email protected]>
Date:   Fri Oct  7 21:24:59 2011 +0200

Return only WidthPoints with dash set to false and add new member to enforce 
minimum width

---

 synfig-studio/src/synfigapp/wplistconverter.cpp |   15 ++++++++++++++-
 synfig-studio/src/synfigapp/wplistconverter.h   |    1 +
 2 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/synfig-studio/src/synfigapp/wplistconverter.cpp 
b/synfig-studio/src/synfigapp/wplistconverter.cpp
index 2978b40..da833bd 100644
--- a/synfig-studio/src/synfigapp/wplistconverter.cpp
+++ b/synfig-studio/src/synfigapp/wplistconverter.cpp
@@ -150,7 +150,10 @@ WPListConverter::operator()(std::list<synfig::WidthPoint> 
&wp_out, const std::li
                k2=find_next(kem);
                synfig::info("new k1 %d, k2 %d", k1, k2);
        }
-       wp_out.assign(work_out.begin(), work_out.end());
+       wp_out.clear();
+       for(i=0;i<n;i++)
+               if(!work_out[i].get_dash())
+                       wp_out.push_back(work_out[i]);
 }
 
 unsigned int
@@ -242,6 +245,16 @@ WPListConverter::clear()
        n=0;
 }
 
+void
+WPListConverter::EnforceMinWidth(std::list<synfig::WidthPoint> &wplist, 
synfig::Real min_pressure)
+{
+       std::list<synfig::WidthPoint>::iterator i(wplist.begin()), 
end(wplist.end());
+       for(; i!= end; ++i)
+               if(i->get_width() < min_pressure)
+                       i->set_width(min_pressure);
+}
+
+
 /* === E N T R Y P O I N T ================================================= */
 
 
diff --git a/synfig-studio/src/synfigapp/wplistconverter.h 
b/synfig-studio/src/synfigapp/wplistconverter.h
index 3a6ec34..deef414 100644
--- a/synfig-studio/src/synfigapp/wplistconverter.h
+++ b/synfig-studio/src/synfigapp/wplistconverter.h
@@ -77,6 +77,7 @@ private:
 public:
        synfig::Real err2max;
        WPListConverter();
+       static void EnforceMinWidth(std::list<synfig::WidthPoint> &wplist, 
synfig::Real min_pressure);
        void operator()(std::list<synfig::WidthPoint> &wp_out, const 
std::list<synfig::Point> &p, const std::list<synfig::Real> &w);
 };
 


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to