diff options
author | Norbert Lange | 2009-07-17 21:23:54 +0000 |
---|---|---|
committer | Norbert Lange | 2009-07-17 21:23:54 +0000 |
commit | bb64bf008d03e01760a468d0df8cacb164725d41 (patch) | |
tree | d73710df5b07f3fa1ca30e719c1c1f58ebe0b107 /graphics/VectorRendererSpec.cpp | |
parent | 81ac29ebca30c352646a5b21de512087cb96a672 (diff) | |
parent | 53756ef1d022a959b24c041e18f55eef34e60dd3 (diff) | |
download | scummvm-rg350-bb64bf008d03e01760a468d0df8cacb164725d41.tar.gz scummvm-rg350-bb64bf008d03e01760a468d0df8cacb164725d41.tar.bz2 scummvm-rg350-bb64bf008d03e01760a468d0df8cacb164725d41.zip |
merge with trunk
svn-id: r42574
Diffstat (limited to 'graphics/VectorRendererSpec.cpp')
-rw-r--r-- | graphics/VectorRendererSpec.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 49dc2c0ef0..b68f4822d8 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -600,12 +600,12 @@ drawRoundedSquare(int x, int y, int r, int w, int 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 - && y + h + Base::_shadowOffset < Base::_activeSurface->h) { + && x + w + Base::_shadowOffset + 1 < Base::_activeSurface->w + && y + h + Base::_shadowOffset + 1 < Base::_activeSurface->h) { drawRoundedSquareShadow(x, y, r, w, h, Base::_shadowOffset); } @@ -919,10 +919,12 @@ drawBevelSquareAlg(int x, int y, int w, int h, int bevel, PixelType top_color, P } int i, j; + x = MAX(x - bevel, 0); y = MAX(y - bevel, 0); - h += bevel << 1; - w += bevel << 1; + + w = MIN(w + (bevel * 2), (int)_activeSurface->w); + h = MIN(h + (bevel * 2), (int)_activeSurface->h); PixelType *ptr_left = (PixelType *)_activeSurface->getBasePtr(x, y); |