[mistelix] Fixes text position and box size



commit b76d717b7bede0f8a36742725f091bc8f2eae62d
Author: Jordi Mas <jmas softcatala org>
Date:   Sat May 9 18:14:09 2009 +0200

    Fixes text position and box size
---
 src/core/SlideImage.cs |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/core/SlideImage.cs b/src/core/SlideImage.cs
index 7ca4d40..13fe53f 100644
--- a/src/core/SlideImage.cs
+++ b/src/core/SlideImage.cs
@@ -213,8 +213,8 @@ namespace Mistelix.DataModel
 		{
 			const int marginx = 50; // Distance of the coloured box from the x margins (in safe area)
 			const int marginy = 50; // Distance of the coloured box from the y margins (in safe area)
-			const int textoffset_x = 5; // Offset were the text is drawn
-			const int textoffset_y = 5; // Offset were the text is drawn
+			const int textoffset_x = 5; // Offset where the text is drawn
+			const int textoffset_y = 5; // Offset where the text is drawn
 			int box_x, box_y, box_w, box_h;
 			int w, h;
 			int max_width;
@@ -235,16 +235,16 @@ namespace Mistelix.DataModel
 				box_x = x + ((width - (marginx * 2) - w) /2);
 				box_x += marginx;
 				box_w = w;
-				box_h = y + h + textoffset_y * 2;
+				box_h = h + textoffset_y * 2;
 
 				switch (Position) {
 				case TextPosition.Top:
-					box_y = marginy;
+					box_y = y + marginy;
 					break;
 				case TextPosition.Bottom:
 				default:
-					box_y = height - marginy - h;
-					break;					
+					box_y = y + height - marginy - h;
+					break;
 				}
 
 				// Background



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]