diff options
author | Alexander Tkachev | 2016-06-29 21:12:44 +0600 |
---|---|---|
committer | Eugene Sandulenko | 2016-07-03 12:22:26 +0200 |
commit | 0dcd29e998e29b8a056493bf95adf98b9de5aecf (patch) | |
tree | 66a98115297404bbdb2b7397643f6b90fb8ea863 /graphics/VectorRendererSpec.cpp | |
parent | 80412a4139d19024a9ef941004380e6bbb8d4da9 (diff) | |
download | scummvm-rg350-0dcd29e998e29b8a056493bf95adf98b9de5aecf.tar.gz scummvm-rg350-0dcd29e998e29b8a056493bf95adf98b9de5aecf.tar.bz2 scummvm-rg350-0dcd29e998e29b8a056493bf95adf98b9de5aecf.zip |
GUI: Fix drawRoundedSquareClip()
Diffstat (limited to 'graphics/VectorRendererSpec.cpp')
-rw-r--r-- | graphics/VectorRendererSpec.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 672ca3416b..9260728478 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -1355,7 +1355,7 @@ drawRoundedSquare(int x, int y, int r, int w, int h) { template<typename PixelType> void VectorRendererSpec<PixelType>:: -drawRoundedSquareClip(int x, int y, int r, int w, int h, int cx, int cy, int cw, int ch) { +drawRoundedSquareClip(int x, int y, int r, int w, int h, Common::Rect clipping) { if (x + w > Base::_activeSurface->w || y + h > Base::_activeSurface->h || w <= 0 || h <= 0 || x < 0 || y < 0 || r <= 0) return; @@ -1367,20 +1367,21 @@ drawRoundedSquareClip(int x, int y, int r, int w, int h, int cx, int cy, int cw, return; Common::Rect backup = _clippingArea; - _clippingArea = Common::Rect(cx, cy, cx + cw, cy + ch); + _clippingArea = clipping; + bool useOriginal = (_clippingArea.isEmpty() || _clippingArea.contains(Common::Rect(x, y, x + w, y + h))); if (Base::_fillMode != kFillDisabled && Base::_shadowOffset && x + w + Base::_shadowOffset + 1 < Base::_activeSurface->w && y + h + Base::_shadowOffset + 1 < Base::_activeSurface->h && h > (Base::_shadowOffset + 1) * 2) { - if (_clippingArea.isEmpty() || _clippingArea.contains(Common::Rect(x, y, x + w, y + h))) { + if (useOriginal) { drawRoundedSquareShadow(x, y, r, w, h, Base::_shadowOffset); } else { drawRoundedSquareShadowClip(x, y, r, w, h, Base::_shadowOffset); } } - if (_clippingArea.isEmpty() || _clippingArea.contains(Common::Rect(x, y, x + w, y + h))) { + if (useOriginal) { drawRoundedSquareAlg(x, y, r, w, h, _fgColor, Base::_fillMode); } else { drawRoundedSquareAlgClip(x, y, r, w, h, _fgColor, Base::_fillMode); |