From: dooglus Date: Wed, 24 Oct 2007 23:06:35 +0000 (+0000) Subject: Fix the warning that the last commit introduced. And only round_to_int once. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=fbf931812d7fc58c6457c898c7758debbf56a3b5;p=synfig.git Fix the warning that the last commit introduced. And only round_to_int once. git-svn-id: http://svn.voria.com/code@966 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.cpp b/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.cpp index 875c0ce..fd54c7a 100644 --- a/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.cpp +++ b/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.cpp @@ -823,13 +823,13 @@ Layer_Freetype::accelerated_render(Context context,Surface *surface,int quality, for(curr_line=0,iter=lines.begin();iter!=lines.end();++iter,curr_line++) { bx=round_to_int((pos[0]-renddesc.get_tl()[0])*pw*CHAR_RESOLUTION-orient[0]*iter->width); - by=round_to_int((pos[1]-renddesc.get_tl()[1])*ph*CHAR_RESOLUTION+(1.0-orient[1])*string_height-line_height*curr_line); - // I've no idea why 1.5, but it kind of works. Otherwise, // rendering to .bmp (which renders from bottom to top, due to // the .bmp format describing the image from bottom to top, // renders text in the wrong place. - if (ph>0) by += line_height/1.5; + by=round_to_int((pos[1]-renddesc.get_tl()[1])*ph*CHAR_RESOLUTION + + (1.0-orient[1])*string_height-line_height*curr_line + + ((ph>0) ? line_height/1.5 : 0)); //by=round_to_int(vcompress*((pos[1]-renddesc.get_tl()[1])*ph*64+(1.0-orient[1])*string_height-face->size->metrics.height*curr_line)); //synfig::info("curr_line=%d, bx=%d, by=%d",curr_line,bx,by);