[Synfig-devl] Carlos Lopez : Add keyframe mark in the curves dock dialogue when it exists .

2009-08-18 Thread Konstantin Dmitriev
Module: synfig
Branch: zelgadis_master
Commit: 309ed1f5a3ab11376662015494c760d6e822bddd
URL:
http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=309ed1f5a3ab11376662015494c760d6e822bddd

Author: Carlos Lopez 
Date:   Thu Jul 16 01:07:33 2009 +0200

Add keyframe mark in the curves dock dialogue when it exists.

---

 synfig-studio/trunk/src/gtkmm/widget_curves.cpp |   22 ++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp 
b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
index 9375880..efd2cd1 100644
--- a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
+++ b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
@@ -501,6 +501,28 @@ Widget_Curves::redraw(GdkEventExpose */*bleh*/)
gc->set_rgb_fg_color(Gdk::Color("#ff")); // It should be user 
selectable
get_window()->draw_rectangle(gc, false, 
round_to_int((time_adjustment_->get_value()-t_begin)/dt), 0, 0, h);
 
+   // This is not the best solution but I guess that if the first valuenode
+   // has canvas then show the keyframes. Maybe I can loop all them until 
I find
+   // a valid canvas and use it for look to the keyframes.
+   synfig::Canvas::Handle 
canvas(curve_list_.begin()->value_desc.get_canvas());
+   if(canvas)
+   {
+   const synfig::KeyframeList& 
keyframe_list(canvas->keyframe_list());
+   synfig::KeyframeList::const_iterator iter;
+
+   for(iter=keyframe_list.begin();iter!=keyframe_list.end();++iter)
+   {
+   if(!iter->get_time().is_valid())
+   continue;
+
+   const int 
x((int)((float)w/(t_end-t_begin)*(iter->get_time()-t_begin)));
+   if(iter->get_time()>=t_begin && iter->get_time()set_rgb_fg_color(Gdk::Color("#a07f7f")); // 
It should be user selectable
+   get_window()->draw_rectangle(gc, true, x, 0, 1, 
h);
+   }
+   }
+   }
// Draw curves for the valuenodes stored in the curve list

for(curve_iter=curve_list_.begin();curve_iter!=curve_list_.end();++curve_iter)
{


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Synfig-devl mailing list
Synfig-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synfig-devl


[Synfig-devl] Carlos Lopez : Add keyframe mark in the curves dock dialogue when it exists .

2009-07-27 Thread Genete
Module: synfig
Branch: genete_master
Commit: 309ed1f5a3ab11376662015494c760d6e822bddd
URL:
http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=309ed1f5a3ab11376662015494c760d6e822bddd

Author: Carlos Lopez 
Date:   Thu Jul 16 01:07:33 2009 +0200

Add keyframe mark in the curves dock dialogue when it exists.

---

 synfig-studio/trunk/src/gtkmm/widget_curves.cpp |   22 ++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp 
b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
index 9375880..efd2cd1 100644
--- a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
+++ b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
@@ -501,6 +501,28 @@ Widget_Curves::redraw(GdkEventExpose */*bleh*/)
gc->set_rgb_fg_color(Gdk::Color("#ff")); // It should be user 
selectable
get_window()->draw_rectangle(gc, false, 
round_to_int((time_adjustment_->get_value()-t_begin)/dt), 0, 0, h);
 
+   // This is not the best solution but I guess that if the first valuenode
+   // has canvas then show the keyframes. Maybe I can loop all them until 
I find
+   // a valid canvas and use it for look to the keyframes.
+   synfig::Canvas::Handle 
canvas(curve_list_.begin()->value_desc.get_canvas());
+   if(canvas)
+   {
+   const synfig::KeyframeList& 
keyframe_list(canvas->keyframe_list());
+   synfig::KeyframeList::const_iterator iter;
+
+   for(iter=keyframe_list.begin();iter!=keyframe_list.end();++iter)
+   {
+   if(!iter->get_time().is_valid())
+   continue;
+
+   const int 
x((int)((float)w/(t_end-t_begin)*(iter->get_time()-t_begin)));
+   if(iter->get_time()>=t_begin && iter->get_time()set_rgb_fg_color(Gdk::Color("#a07f7f")); // 
It should be user selectable
+   get_window()->draw_rectangle(gc, true, x, 0, 1, 
h);
+   }
+   }
+   }
// Draw curves for the valuenodes stored in the curve list

for(curve_iter=curve_list_.begin();curve_iter!=curve_list_.end();++curve_iter)
{


--
___
Synfig-devl mailing list
Synfig-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synfig-devl


[Synfig-devl] Carlos Lopez : Add keyframe mark in the curves dock dialogue when it exists .

2009-07-19 Thread Genete
Module: synfig
Branch: master
Commit: 309ed1f5a3ab11376662015494c760d6e822bddd
URL:
http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=309ed1f5a3ab11376662015494c760d6e822bddd

Author: Carlos Lopez 
Date:   Thu Jul 16 01:07:33 2009 +0200

Add keyframe mark in the curves dock dialogue when it exists.

---

 synfig-studio/trunk/src/gtkmm/widget_curves.cpp |   22 ++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp 
b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
index 9375880..efd2cd1 100644
--- a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
+++ b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
@@ -501,6 +501,28 @@ Widget_Curves::redraw(GdkEventExpose */*bleh*/)
gc->set_rgb_fg_color(Gdk::Color("#ff")); // It should be user 
selectable
get_window()->draw_rectangle(gc, false, 
round_to_int((time_adjustment_->get_value()-t_begin)/dt), 0, 0, h);
 
+   // This is not the best solution but I guess that if the first valuenode
+   // has canvas then show the keyframes. Maybe I can loop all them until 
I find
+   // a valid canvas and use it for look to the keyframes.
+   synfig::Canvas::Handle 
canvas(curve_list_.begin()->value_desc.get_canvas());
+   if(canvas)
+   {
+   const synfig::KeyframeList& 
keyframe_list(canvas->keyframe_list());
+   synfig::KeyframeList::const_iterator iter;
+
+   for(iter=keyframe_list.begin();iter!=keyframe_list.end();++iter)
+   {
+   if(!iter->get_time().is_valid())
+   continue;
+
+   const int 
x((int)((float)w/(t_end-t_begin)*(iter->get_time()-t_begin)));
+   if(iter->get_time()>=t_begin && iter->get_time()set_rgb_fg_color(Gdk::Color("#a07f7f")); // 
It should be user selectable
+   get_window()->draw_rectangle(gc, true, x, 0, 1, 
h);
+   }
+   }
+   }
// Draw curves for the valuenodes stored in the curve list

for(curve_iter=curve_list_.begin();curve_iter!=curve_list_.end();++curve_iter)
{


--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Synfig-devl mailing list
Synfig-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synfig-devl


[Synfig-devl] Carlos Lopez : Add keyframe mark in the curves dock dialogue when it exists .

2009-07-15 Thread Genete
Module: synfig
Branch: genete_curves_dock
Commit: c9dc486c1f4ea2dd54c5eaf5fdccdd78369f5c3e
URL:
http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=c9dc486c1f4ea2dd54c5eaf5fdccdd78369f5c3e

Author: Carlos Lopez 
Date:   Thu Jul 16 01:07:33 2009 +0200

Add keyframe mark in the curves dock dialogue when it exists.

---

 synfig-studio/trunk/src/gtkmm/widget_curves.cpp |   22 ++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp 
b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
index 9375880..efd2cd1 100644
--- a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
+++ b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
@@ -501,6 +501,28 @@ Widget_Curves::redraw(GdkEventExpose */*bleh*/)
gc->set_rgb_fg_color(Gdk::Color("#ff")); // It should be user 
selectable
get_window()->draw_rectangle(gc, false, 
round_to_int((time_adjustment_->get_value()-t_begin)/dt), 0, 0, h);
 
+   // This is not the best solution but I guess that if the first valuenode
+   // has canvas then show the keyframes. Maybe I can loop all them until 
I find
+   // a valid canvas and use it for look to the keyframes.
+   synfig::Canvas::Handle 
canvas(curve_list_.begin()->value_desc.get_canvas());
+   if(canvas)
+   {
+   const synfig::KeyframeList& 
keyframe_list(canvas->keyframe_list());
+   synfig::KeyframeList::const_iterator iter;
+
+   for(iter=keyframe_list.begin();iter!=keyframe_list.end();++iter)
+   {
+   if(!iter->get_time().is_valid())
+   continue;
+
+   const int 
x((int)((float)w/(t_end-t_begin)*(iter->get_time()-t_begin)));
+   if(iter->get_time()>=t_begin && iter->get_time()set_rgb_fg_color(Gdk::Color("#a07f7f")); // 
It should be user selectable
+   get_window()->draw_rectangle(gc, true, x, 0, 1, 
h);
+   }
+   }
+   }
// Draw curves for the valuenodes stored in the curve list

for(curve_iter=curve_list_.begin();curve_iter!=curve_list_.end();++curve_iter)
{


--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Synfig-devl mailing list
Synfig-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synfig-devl