Author: Carlos Lopez <[email protected]>
Date:   Sun Mar 13 12:50:42 2011 +0100

Add Flat tip type and use rounded tips for the newly created bline

---

 .../src/modules/mod_geometry/advanced_outline.cpp  |   14 ++++++++++++++
 synfig-core/src/synfig/valuenode_composite.cpp     |    2 ++
 synfig-core/src/synfig/widthpoint.h                |    3 ++-
 3 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/synfig-core/src/modules/mod_geometry/advanced_outline.cpp 
b/synfig-core/src/modules/mod_geometry/advanced_outline.cpp
index 7c5ab30..c0edb27 100644
--- a/synfig-core/src/modules/mod_geometry/advanced_outline.cpp
+++ b/synfig-core/src/modules/mod_geometry/advanced_outline.cpp
@@ -106,6 +106,8 @@ Advanced_Outline::Advanced_Outline()
        wpoint_list[1].set_position(1.0);
        wpoint_list[0].set_width(0.0);
        wpoint_list[1].set_width(1.0);
+       wpoint_list[0].set_side_type_before(WidthPoint::TYPE_ROUNDED);
+       wpoint_list[1].set_side_type_after(WidthPoint::TYPE_ROUNDED);
        wplist_=wpoint_list;
        Layer::Vocab voc(get_param_vocab());
        Layer::fill_static(voc);
@@ -591,6 +593,12 @@ Advanced_Outline::add_tip(std::vector<Point> &side_a, 
std::vector<Point> &side_b
                        side_b.push_back(vertex);
                        break;
                }
+               case WidthPoint::TYPE_FLAT:
+               {
+                       side_a.push_back(vertex);
+                       side_b.push_back(vertex);
+                       break;
+               }
                case WidthPoint::TYPE_INTERPOLATE:
                default:
                        break;
@@ -643,6 +651,12 @@ Advanced_Outline::add_tip(std::vector<Point> &side_a, 
std::vector<Point> &side_b
                        side_b.push_back(vertex);
                        break;
                }
+               case WidthPoint::TYPE_FLAT:
+               {
+                       side_a.push_back(vertex);
+                       side_b.push_back(vertex);
+                       break;
+               }
                case WidthPoint::TYPE_INTERPOLATE:
                default:
                        break;
diff --git a/synfig-core/src/synfig/valuenode_composite.cpp 
b/synfig-core/src/synfig/valuenode_composite.cpp
index 93af850..605f144 100644
--- a/synfig-core/src/synfig/valuenode_composite.cpp
+++ b/synfig-core/src/synfig/valuenode_composite.cpp
@@ -478,6 +478,7 @@ ValueNode_Composite::get_children_vocab_vfunc()const
                        .add_enum_value(WidthPoint::TYPE_ROUNDED,"rounded", 
_("Rounded Stop"))
                        .add_enum_value(WidthPoint::TYPE_SQUARED,"squared", 
_("Squared Stop"))
                        .add_enum_value(WidthPoint::TYPE_PEAK,"peak", _("Peak 
Stop"))
+                       .add_enum_value(WidthPoint::TYPE_FLAT,"flat", _("Flat 
Stop"))
                        );
                ret.push_back(ParamDesc(ValueBase(),"side_after")
                        .set_local_name(_("Side Type After"))
@@ -487,6 +488,7 @@ ValueNode_Composite::get_children_vocab_vfunc()const
                        .add_enum_value(WidthPoint::TYPE_ROUNDED,"rounded", 
_("Rounded Stop"))
                        .add_enum_value(WidthPoint::TYPE_SQUARED,"squared", 
_("Squared Stop"))
                        .add_enum_value(WidthPoint::TYPE_PEAK,"peak", _("Peak 
Stop"))
+                       .add_enum_value(WidthPoint::TYPE_FLAT,"flat", _("Flat 
Stop"))
                );
                return ret;
        default:
diff --git a/synfig-core/src/synfig/widthpoint.h 
b/synfig-core/src/synfig/widthpoint.h
index 0958664..78c0a56 100644
--- a/synfig-core/src/synfig/widthpoint.h
+++ b/synfig-core/src/synfig/widthpoint.h
@@ -54,7 +54,8 @@ public:
                TYPE_INTERPOLATE     =0,
                TYPE_ROUNDED         =1,
                TYPE_SQUARED         =2,
-               TYPE_PEAK            =3
+               TYPE_PEAK            =3,
+               TYPE_FLAT            =4
        };
 
        WidthPoint();


------------------------------------------------------------------------------
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

Reply via email to