projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Made a start at implementing the ideas in http://synfig.org/Linking_to_Blines . ...
[synfig.git]
/
synfig-studio
/
tags
/
stable
/
src
/
gtkmm
/
renderer_timecode.cpp
diff --git
a/synfig-studio/tags/stable/src/gtkmm/renderer_timecode.cpp
b/synfig-studio/tags/stable/src/gtkmm/renderer_timecode.cpp
index
2910a98
..
48cc42b
100644
(file)
--- a/
synfig-studio/tags/stable/src/gtkmm/renderer_timecode.cpp
+++ b/
synfig-studio/tags/stable/src/gtkmm/renderer_timecode.cpp
@@
-6,6
+6,7
@@
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
@@
-37,6
+38,8
@@
#include "app.h"
#include <cassert>
#include "app.h"
#include <cassert>
+#include "general.h"
+
#endif
/* === U S I N G =========================================================== */
#endif
/* === U S I N G =========================================================== */
@@
-75,7
+78,7
@@
Renderer_Timecode::get_grid_size()const
void
Renderer_Timecode::render_vfunc(
const Glib::RefPtr<Gdk::Drawable>& drawable,
void
Renderer_Timecode::render_vfunc(
const Glib::RefPtr<Gdk::Drawable>& drawable,
- const Gdk::Rectangle&
expose_area
+ const Gdk::Rectangle&
/*expose_area*/
)
{
assert(get_work_area());
)
{
assert(get_work_area());
@@
-146,10
+149,15
@@
Renderer_Timecode::render_vfunc(
gc->set_rgb_fg_color(Gdk::Color("#5f0000"));
try
{
gc->set_rgb_fg_color(Gdk::Color("#5f0000"));
try
{
+ int w, h;
layout->set_text(canvas->keyframe_list().find(cur_time)->get_description());
layout->set_text(canvas->keyframe_list().find(cur_time)->get_description());
+ layout->get_size(w, h);
+ get_work_area()->timecode_width = int(w*1.0/Pango::SCALE);
+ get_work_area()->timecode_height = int(h*1.0/Pango::SCALE);
}
catch(synfig::Exception::NotFound)
{
}
catch(synfig::Exception::NotFound)
{
+ get_work_area()->timecode_width = get_work_area()->timecode_height = 0;
return;
}
catch(...) {
return;
}
catch(...) {