X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Frenderer_timecode.cpp;h=48cc42b703f1c2e46afefb8ee40a2c277f7e357e;hb=933698eb69791193b53ce0142909502de42a6124;hp=7d5f3579dfb6aed9df3f1b869dd2c4d12f441651;hpb=c3ad95144d148602f672e95ddda1f18fc35502f8;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/renderer_timecode.cpp b/synfig-studio/trunk/src/gtkmm/renderer_timecode.cpp index 7d5f357..48cc42b 100644 --- a/synfig-studio/trunk/src/gtkmm/renderer_timecode.cpp +++ b/synfig-studio/trunk/src/gtkmm/renderer_timecode.cpp @@ -6,6 +6,7 @@ ** ** \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 @@ -37,6 +38,8 @@ #include "app.h" #include +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -146,10 +149,15 @@ Renderer_Timecode::render_vfunc( gc->set_rgb_fg_color(Gdk::Color("#5f0000")); try { + int w, h; 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) { + get_work_area()->timecode_width = get_work_area()->timecode_height = 0; return; } catch(...) {