Author: Carlos Lopez <[email protected]>
Date: Mon Aug 8 13:05:34 2011 +0200
Add Dash Offset parameter to the Adanced Outline Layer
---
.../src/modules/mod_geometry/advanced_outline.cpp | 9 +++++++++
.../src/modules/mod_geometry/advanced_outline.h | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/synfig-core/src/modules/mod_geometry/advanced_outline.cpp
b/synfig-core/src/modules/mod_geometry/advanced_outline.cpp
index a57b9e9..45425da 100644
--- a/synfig-core/src/modules/mod_geometry/advanced_outline.cpp
+++ b/synfig-core/src/modules/mod_geometry/advanced_outline.cpp
@@ -79,6 +79,7 @@ Advanced_Outline::Advanced_Outline()
width_=1.0f;
expand_=0;
smoothness_=0.5;
+ dash_offset_=0.0;
clear();
vector<BLinePoint> bline_point_list;
@@ -510,6 +511,7 @@ Advanced_Outline::set_param(const String & param, const
ValueBase &value)
IMPORT_AS(end_tip_, "end_tip");
IMPORT_AS(width_,"width");
IMPORT_AS(expand_, "expand");
+ IMPORT_AS(dash_offset_,"dash_offset");
if(param=="smoothness" && value.get_type()==ValueBase::TYPE_REAL)
{
if(value > 1.0) smoothness_=1.0;
@@ -557,6 +559,7 @@ Advanced_Outline::get_param(const String& param)const
EXPORT_AS(end_tip_,"end_tip");
EXPORT_AS(width_, "width");
EXPORT_AS(wplist_, "wplist");
+ EXPORT_AS(dash_offset_,"dash_offset");
EXPORT_AS(dilist_, "dilist");
EXPORT_NAME();
EXPORT_VERSION();
@@ -628,6 +631,12 @@ Advanced_Outline::get_param_vocab()const
.set_origin("origin")
.set_description(_("List of dash items that defines the dashed
outline"))
);
+ ret.push_back(ParamDesc("dash_offset")
+ .set_local_name(_("Dash Items Offset"))
+ .set_is_distance()
+ .set_hint("dash")
+ .set_description(_("Distance to Offset the Dash Items"))
+ );
return ret;
}
diff --git a/synfig-core/src/modules/mod_geometry/advanced_outline.h
b/synfig-core/src/modules/mod_geometry/advanced_outline.h
index 3543197..b8ffcc5 100644
--- a/synfig-core/src/modules/mod_geometry/advanced_outline.h
+++ b/synfig-core/src/modules/mod_geometry/advanced_outline.h
@@ -59,6 +59,7 @@ private:
synfig::Real width_;
synfig::Real expand_;
Real smoothness_;
+ Real dash_offset_;
public:
enum CuspType
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl