[Scummvm-cvs-logs] SF.net SVN: scummvm: [33040] scummvm/branches/gsoc2008-gui
Tanoku at users.sourceforge.net
Tanoku at users.sourceforge.net
Sun Jul 13 19:08:44 CEST 2008
Revision: 33040
http://scummvm.svn.sourceforge.net/scummvm/?rev=33040&view=rev
Author: Tanoku
Date: 2008-07-13 10:08:44 -0700 (Sun, 13 Jul 2008)
Log Message:
-----------
Bugfix of the bugfix. Rounded squares work now on all resolutions.
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-13 16:41:44 UTC (rev 33039)
+++ scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp 2008-07-13 17:08:44 UTC (rev 33040)
@@ -129,6 +129,17 @@
*(ptr4 + (y) + (px)) = color; \
}
+#define __BE_DRAWCIRCLE_XCOLOR(ptr1,ptr2,ptr3,ptr4,x,y,px,py) { \
+ *(ptr1 + (y) - (px)) = color1; \
+ *(ptr1 + (x) - (py)) = color2; \
+ *(ptr2 - (x) - (py)) = color2; \
+ *(ptr2 - (y) - (px)) = color1; \
+ *(ptr3 - (y) + (px)) = color3; \
+ *(ptr3 - (x) + (py)) = color4; \
+ *(ptr4 + (x) + (py)) = color4; \
+ *(ptr4 + (y) + (px)) = color3; \
+}
+
#define __BE_RESET() { \
f = 1 - r; \
ddF_x = 0; ddF_y = -2 * r; \
@@ -703,17 +714,24 @@
}
} else {
__BE_RESET();
-
+ PixelType color1, color2, color3, color4;
+
if (fill_m == kFillGradient) {
while (x++ < y) {
__BE_ALGORITHM();
- colorFill(ptr_tl - x - py, ptr_tr + x - py, calcGradient(real_radius - y, long_h));
- colorFill(ptr_tl - y - px, ptr_tr + y - px, calcGradient(real_radius - x, long_h));
+
+ color1 = calcGradient(real_radius - x, long_h);
+ color2 = calcGradient(real_radius - y, long_h);
+ color3 = calcGradient(long_h - r + x, long_h);
+ color4 = calcGradient(long_h - r + y, long_h);
+
+ colorFill(ptr_tl - x - py, ptr_tr + x - py, color2);
+ colorFill(ptr_tl - y - px, ptr_tr + y - px, color1);
- colorFill(ptr_bl - x + py, ptr_br + x + py, calcGradient(long_h - r + y, long_h));
- colorFill(ptr_bl - y + px, ptr_br + y + px, calcGradient(long_h - r + x, long_h));
+ colorFill(ptr_bl - x + py, ptr_br + x + py, color4);
+ colorFill(ptr_bl - y + px, ptr_br + y + px, color3);
-// __BE_DRAWCIRCLE(ptr_tr, ptr_tl, ptr_bl, ptr_br, x, y, px, py);
+ __BE_DRAWCIRCLE_XCOLOR(ptr_tr, ptr_tl, ptr_bl, ptr_br, x, y, px, py);
}
} else {
while (x++ < y) {
@@ -725,8 +743,8 @@
colorFill(ptr_bl - x + py, ptr_br + x + py, color);
colorFill(ptr_bl - y + px, ptr_br + y + px, color);
- // FIXME: maybe not needed at all?
-// __BE_DRAWCIRCLE(ptr_tr, ptr_tl, ptr_bl, ptr_br, x, y, px, py);
+ // do not remove - messes up the drawing at lower resolutions
+ __BE_DRAWCIRCLE(ptr_tr, ptr_tl, ptr_bl, ptr_br, x, y, px, py);
}
}
Modified: scummvm/branches/gsoc2008-gui/gui/ThemeDefaultXML.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeDefaultXML.cpp 2008-07-13 16:41:44 UTC (rev 33039)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeDefaultXML.cpp 2008-07-13 17:08:44 UTC (rev 33040)
@@ -60,7 +60,7 @@
"</drawdata>"
"<drawdata id = 'button_idle' cache = false>"
- "<text vertical_align = 'center' horizontal_align = 'center' color = '128, 128, 128' />"
+ "<text vertical_align = 'center' horizontal_align = 'center' color = '173, 40, 8' />"
"<drawstep func = 'roundedsq' radius = '8' stroke = 0 fill = 'foreground' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' shadow = 3 />"
"</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