From 859a0475c289b406b9cc75473a52757dc859f1d1 Mon Sep 17 00:00:00 2001 From: genete Date: Thu, 11 Sep 2008 15:00:44 +0000 Subject: [PATCH] Fix the aspect ratio bug introduced by the previous commits of preferred X/Y new document size. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2046 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/app.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index beb061d..8525e0a 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -2398,8 +2398,10 @@ App::new_instance() canvas->rend_desc().set_time_end(5.0); canvas->rend_desc().set_x_res(DPI2DPM(72.0f)); canvas->rend_desc().set_y_res(DPI2DPM(72.0f)); - canvas->rend_desc().set_tl(Vector(-4,2.25)); - canvas->rend_desc().set_br(Vector(4,-2.25)); + // The top left and botton right positions are expressed in units + // Original convention is that 1 unit = 60 pixels + canvas->rend_desc().set_tl(Vector(-(preferred_x_size/60.0)/2.0,(preferred_y_size/60.0)/2.0)); + canvas->rend_desc().set_br(Vector((preferred_x_size/60.0)/2.0,-(preferred_y_size/60.0)/2.0)); canvas->rend_desc().set_w(preferred_x_size); canvas->rend_desc().set_h(preferred_y_size); canvas->rend_desc().set_antialias(1); -- 2.7.4