Author: Carlos Lopez <[email protected]>
Date: Sat Mar 12 18:24:44 2011 +0100
Fix wrong cusp added when not needed.
---
.../src/modules/mod_geometry/advanced_outline.cpp | 23 ++++++++++---------
1 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/synfig-core/src/modules/mod_geometry/advanced_outline.cpp
b/synfig-core/src/modules/mod_geometry/advanced_outline.cpp
index c3bdfb4..4abcc6b 100644
--- a/synfig-core/src/modules/mod_geometry/advanced_outline.cpp
+++ b/synfig-core/src/modules/mod_geometry/advanced_outline.cpp
@@ -229,7 +229,8 @@ Advanced_Outline::sync()
Real ipos(0.0);
Real step(1.0/SAMPLES/bline_size);
- witer=wnext=wplist.begin();
+ witer=--wplist.end();
+ wnext=wplist.begin();
const vector<WidthPoint>::const_iterator wend(wplist.end());
do
{
@@ -259,16 +260,6 @@ Advanced_Outline::sync()
else
continue;
}
- if((ipos==biter_pos || ipos==bnext_pos))
- {
- // Do cusp at ipos
- if(ipos==biter_pos /*&& ipos!=0.0*/ &&
sharp_cusps_ && split_flag)
- {
- add_cusp(side_a, side_b,
biter->get_vertex(), iter_t, last_tangent,
width_*0.5*widthpoint_interpolate(*witer, *wnext, ipos));
- }
- if(bnext+1==bend && ipos == bnext_pos)
- break;
- }
if(witer->get_side_type_after()!=WidthPoint::TYPE_INTERPOLATE &&
wnext->get_side_type_before()!=WidthPoint::TYPE_INTERPOLATE)
{
@@ -286,6 +277,16 @@ Advanced_Outline::sync()
}
continue;
}
+ if((ipos==biter_pos || ipos==bnext_pos))
+ {
+ // Do cusp at ipos
+ if(ipos==biter_pos /*&& ipos!=0.0*/ &&
sharp_cusps_ && split_flag)
+ {
+ add_cusp(side_a, side_b,
biter->get_vertex(), iter_t, last_tangent,
width_*0.5*widthpoint_interpolate(*witer, *wnext, ipos));
+ }
+ if(bnext+1==bend && ipos == bnext_pos)
+ break;
+ }
do
{
if(ipos > wnext_pos)
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl