[Scummvm-cvs-logs] SF.net SVN: scummvm:[33286] scummvm/branches/gsoc2008-gui

Tanoku at users.sourceforge.net Tanoku at users.sourceforge.net
Fri Jul 25 13:13:48 CEST 2008


Revision: 33286
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33286&view=rev
Author:   Tanoku
Date:     2008-07-25 11:13:47 +0000 (Fri, 25 Jul 2008)

Log Message:
-----------
More triangle work

Modified Paths:
--------------
    scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp
    scummvm/branches/gsoc2008-gui/gui/ThemeDefaultXML.cpp

Modified: scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp	2008-07-25 10:20:05 UTC (rev 33285)
+++ scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp	2008-07-25 11:13:47 UTC (rev 33286)
@@ -521,18 +521,13 @@
 	if (Base::_dynamicData != 0)
 		orient = (TriangleOrientation)Base::_dynamicData;
 		
-	int newW = w * 3 / 4;
+	int newW = w / 2;
 	if (newW % 2) newW++;
 
 	switch(orient) {
 		case kTriangleUp:
 		case kTriangleDown:
-// #ifdef VECTOR_RENDERER_FAST_TRIANGLES
-			// if (w == h)
-				drawTriangleFast(x + (w / 2) - w * 3 / 8, y + w / 4, newW, (orient == kTriangleDown), color, Base::_fillMode);
-			// else 
-// #endif
-				// drawTriangleVertAlg(x, y, w, h, (orient == kTriangleDown), color, Base::_fillMode);
+			drawTriangleFast(x + (newW / 2), y + (h / 2) - (newW / 2), newW, (orient == kTriangleDown), color, Base::_fillMode);
 			break;
 
 		case kTriangleLeft:
@@ -543,12 +538,7 @@
 
 	if (Base::_strokeWidth > 0)
 		if (Base::_fillMode == kFillBackground || Base::_fillMode == kFillGradient) {
-#ifdef VECTOR_RENDERER_FAST_TRIANGLES
-			if (w == h)
-				drawTriangleFast(x, y, w, (orient == kTriangleDown), _fgColor, kFillDisabled);
-			else
-#endif
-				drawTriangleVertAlg(x, y, w, h, (orient == kTriangleDown), _fgColor, kFillDisabled);
+			drawTriangleFast(x + (newW / 2), y + (h / 2) - (newW / 2), newW, (orient == kTriangleDown), _fgColor, kFillDisabled);
 		}
 }
 

Modified: scummvm/branches/gsoc2008-gui/gui/ThemeDefaultXML.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeDefaultXML.cpp	2008-07-25 10:20:05 UTC (rev 33285)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeDefaultXML.cpp	2008-07-25 11:13:47 UTC (rev 33286)
@@ -107,14 +107,14 @@
 	
 	"<drawdata id = 'popup_idle' cache = false>"
 		"<drawstep func = 'square' stroke = 0 fg_color = '0, 0, 0' fill = 'gradient' gradient_start = '214, 113, 8' gradient_end = '240, 200, 25' shadow = 3 />"
-		"<drawstep func = 'triangle' fg_color = '0, 0, 0' fill = 'foreground' width = '12' height = '12' xpos = '-16' ypos = 'center' orientation = 'bottom' />"
+		"<drawstep func = 'triangle' fg_color = '0, 0, 0' fill = 'foreground' width = 'height' height = 'auto' xpos = 'right' ypos = 'center' orientation = 'bottom' />"
 		"<text font = 'text_default' vertical_align = 'center' horizontal_align = 'right'/>"
 	"</drawdata>"
 	
 	
 	"<drawdata id = 'popup_hover' cache = false>"
 		"<drawstep func = 'square' stroke = 0 fg_color = '0, 0, 0' fill = 'gradient' gradient_start = '214, 113, 8' gradient_end = '240, 200, 25' shadow = 0 />"
-		"<drawstep func = 'triangle' fg_color = '0, 0, 0' fill = 'foreground' width = '12' height = '12' xpos = '-16' ypos = 'center' orientation = 'bottom' />"
+		"<drawstep func = 'triangle' fg_color = '0, 0, 0' fill = 'foreground' width = 'height' height = 'auto' xpos = 'right' ypos = 'center' orientation = 'bottom' />"
 		"<text font = 'text_hover' vertical_align = 'center' horizontal_align = 'right' />"
 	"</drawdata>"
 	


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