[Scummvm-cvs-logs] SF.net SVN: scummvm: [33039] scummvm/branches/gsoc2008-gui
Tanoku at users.sourceforge.net
Tanoku at users.sourceforge.net
Sun Jul 13 18:41:45 CEST 2008
Revision: 33039
http://scummvm.svn.sourceforge.net/scummvm/?rev=33039&view=rev
Author: Tanoku
Date: 2008-07-13 09:41:44 -0700 (Sun, 13 Jul 2008)
Log Message:
-----------
Bugfix: Strange behaviour in rounded square corners.
Modified Paths:
--------------
scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp
scummvm/branches/gsoc2008-gui/gui/ThemeDefaultXML.cpp
scummvm/branches/gsoc2008-gui/gui/ThemeParser.cpp
Modified: scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp 2008-07-13 15:42:45 UTC (rev 33038)
+++ scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp 2008-07-13 16:41:44 UTC (rev 33039)
@@ -339,7 +339,7 @@
void VectorRendererSpec<PixelType, PixelFormat>::
drawRoundedSquare(int x, int y, int r, int w, int h) {
if (x + w > Base::_activeSurface->w || y + h > Base::_activeSurface->h ||
- w <= 0 || h <= 0 || x < 0 || y < 0 || r <= 0 || r > 128)
+ w <= 0 || h <= 0 || x < 0 || y < 0 || r <= 0 || r > 128 || (r << 1) > w || (r << 1) > h)
return;
if (Base::_fillMode != kFillDisabled && Base::_shadowOffset
@@ -712,6 +712,8 @@
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));
+
+// __BE_DRAWCIRCLE(ptr_tr, ptr_tl, ptr_bl, ptr_br, x, y, px, py);
}
} else {
while (x++ < y) {
@@ -724,7 +726,7 @@
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);
+// __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 15:42:45 UTC (rev 33038)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeDefaultXML.cpp 2008-07-13 16:41:44 UTC (rev 33039)
@@ -60,13 +60,13 @@
"</drawdata>"
"<drawdata id = 'button_idle' cache = false>"
- "<text vertical_align = 'center' horizontal_align = 'center' color = '255, 255, 255' />"
- "<drawstep func = 'roundedsq' radius = '8' stroke = 0 fill = 'gradient' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' shadow = 3 />"
+ "<text vertical_align = 'center' horizontal_align = 'center' color = '128, 128, 128' />"
+ "<drawstep func = 'roundedsq' radius = '8' stroke = 0 fill = 'foreground' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' shadow = 3 />"
"</drawdata>"
"<drawdata id = 'button_hover' cache = false>"
"<text vertical_align = 'center' horizontal_align = 'center' color = '255, 255, 255' />"
- "<drawstep func = 'roundedsq' radius = '8' fill = 'gradient' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' shadow = 3 />"
+ "<drawstep func = 'roundedsq' radius = '8' stroke = '1' fill = 'gradient' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' shadow = 3 />"
"</drawdata>"
"<drawdata id = 'checkbox_disabled' cache = false>"
Modified: scummvm/branches/gsoc2008-gui/gui/ThemeParser.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeParser.cpp 2008-07-13 15:42:45 UTC (rev 33038)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeParser.cpp 2008-07-13 16:41:44 UTC (rev 33039)
@@ -103,7 +103,7 @@
step->fillMode = Graphics::VectorRenderer::kFillDisabled;
step->scale = (1 << 16);
step->shadow = 0;
- step->stroke = 1;
+ step->stroke = 0;
step->radius = 0xFF;
return step;
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