aboutsummaryrefslogtreecommitdiff
path: root/graphics/VectorRenderer.cpp
diff options
context:
space:
mode:
authorVicent Marti2008-07-13 16:41:44 +0000
committerVicent Marti2008-07-13 16:41:44 +0000
commita95c6fc76d58d3225e4f31e45ea9d686c79def84 (patch)
tree435c4f67e8aef10f90abf7ca1ef8416a35920342 /graphics/VectorRenderer.cpp
parent9a4992cc37252eb7162aafa72c868558d1b328f1 (diff)
downloadscummvm-rg350-a95c6fc76d58d3225e4f31e45ea9d686c79def84.tar.gz
scummvm-rg350-a95c6fc76d58d3225e4f31e45ea9d686c79def84.tar.bz2
scummvm-rg350-a95c6fc76d58d3225e4f31e45ea9d686c79def84.zip
Bugfix: Strange behaviour in rounded square corners.
svn-id: r33039
Diffstat (limited to 'graphics/VectorRenderer.cpp')
-rw-r--r--graphics/VectorRenderer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp
index efdaea80c8..1827d71024 100644
--- a/graphics/VectorRenderer.cpp
+++ b/graphics/VectorRenderer.cpp
@@ -339,7 +339,7 @@ template<typename PixelType, typename PixelFormat>
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 @@ drawRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType color, Vecto
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 @@ drawRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType color, Vecto
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);
}
}