[Scummvm-cvs-logs] SF.net SVN: scummvm:[42529] scummvm/trunk

tanoku at users.sourceforge.net tanoku at users.sourceforge.net
Thu Jul 16 13:37:37 CEST 2009


Revision: 42529
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42529&view=rev
Author:   tanoku
Date:     2009-07-16 11:37:36 +0000 (Thu, 16 Jul 2009)

Log Message:
-----------
Fixed issue with beveled shapes being drawn outside their shapes. Possible regressions.

Modified Paths:
--------------
    scummvm/trunk/graphics/VectorRendererSpec.cpp
    scummvm/trunk/gui/themes/scummclassic/classic_layout.stx

Modified: scummvm/trunk/graphics/VectorRendererSpec.cpp
===================================================================
--- scummvm/trunk/graphics/VectorRendererSpec.cpp	2009-07-16 09:53:19 UTC (rev 42528)
+++ scummvm/trunk/graphics/VectorRendererSpec.cpp	2009-07-16 11:37:36 UTC (rev 42529)
@@ -596,12 +596,15 @@
 template<typename PixelType>
 void VectorRendererSpec<PixelType>::
 drawRoundedSquare(int x, int y, int r, int w, int h) {
+
+    x++; y++; w--; h--;
+
 	if (x + w > Base::_activeSurface->w || y + h > Base::_activeSurface->h ||
 		w <= 0 || h <= 0 || x < 0 || y < 0 || r <= 0)
 		return;
 
-	if ((r << 1) > w || (r << 1) > h)
-		r = MIN(w >> 1, h >> 1);
+	if ((r * 2) > w || (r * 2) > h)
+		r = MIN(w /2, h / 2);
 
 	if (Base::_fillMode != kFillDisabled && Base::_shadowOffset
 		&& x + w + Base::_shadowOffset < Base::_activeSurface->w
@@ -919,11 +922,15 @@
 	}
 
 	int i, j;
+
+#if 0
 	x = MAX(x - bevel, 0);
 	y = MAX(y - bevel, 0);
-	h += bevel << 1;
-	w += bevel << 1;
 
+    w = w + (bevel * 2);
+    h = h + (bevel * 2);
+#endif
+
 	PixelType *ptr_left = (PixelType *)_activeSurface->getBasePtr(x, y);
 
 	i = bevel;

Modified: scummvm/trunk/gui/themes/scummclassic/classic_layout.stx
===================================================================
--- scummvm/trunk/gui/themes/scummclassic/classic_layout.stx	2009-07-16 09:53:19 UTC (rev 42528)
+++ scummvm/trunk/gui/themes/scummclassic/classic_layout.stx	2009-07-16 11:37:36 UTC (rev 42529)
@@ -54,7 +54,7 @@
 		/>
 			
 		<widget name = 'Button'
-				size = '108, 24'
+				size = '112, 28'
 		/>
 		<widget name = 'Slider'
 				size = '128, 18'
@@ -115,31 +115,31 @@
 			<widget name = 'GameList'/>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10'>
 				<widget name = 'LoadGameButton' 
-						height = '20' 
+						height = '24' 
 				/>
 				<widget name = 'AddGameButton' 
-						height = '20'
+						height = '24'
 				/>
 				<widget name = 'EditGameButton' 
-						height = '20'
+						height = '24'
 				/>
 				<widget name = 'RemoveGameButton' 
-						height = '20'
+						height = '24'
 				/>
 			</layout>
 			<space size = '4'/>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10'>
 				<widget name = 'QuitButton' 
-						height = '20'
+						height = '24'
 				/>
 				<widget name = 'AboutButton' 
-						height = '20'
+						height = '24'
 				/>
 				<widget name = 'OptionsButton' 
-						height = '20'
+						height = '24'
 				/>
 				<widget name = 'StartButton' 
-						height = '20'
+						height = '24'
 				/>
 			</layout>
 		</layout>


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list