diff options
author | Johannes Schickel | 2016-02-21 14:41:29 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-02-21 14:41:29 +0100 |
commit | edaff1bdeaddac9e86417bbc4121f3e7bee1e983 (patch) | |
tree | 9f5cabfdd1691a6df046cf6264d2d36f69b3e703 /graphics/VectorRendererSpec.cpp | |
parent | 1c4f41feedb5a92714964b701b61f12fbde0b2f1 (diff) | |
download | scummvm-rg350-edaff1bdeaddac9e86417bbc4121f3e7bee1e983.tar.gz scummvm-rg350-edaff1bdeaddac9e86417bbc4121f3e7bee1e983.tar.bz2 scummvm-rg350-edaff1bdeaddac9e86417bbc4121f3e7bee1e983.zip |
GRAPHICS: Skip empty rects in VectorRenderer*'s drawInteriorRoundedSquareAlg.
Diffstat (limited to 'graphics/VectorRendererSpec.cpp')
-rw-r--r-- | graphics/VectorRendererSpec.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 065be50333..5e53e61241 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -1710,6 +1710,11 @@ drawBorderRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType color, template<typename PixelType> void VectorRendererSpec<PixelType>:: drawInteriorRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType color, VectorRenderer::FillMode fill_m) { + // Do not draw empty space rounded squares. + if (w <= 0 || h <= 0) { + return; + } + int f, ddF_x, ddF_y; int x, y, px, py; int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel; @@ -2246,6 +2251,11 @@ drawBorderRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType color, template<typename PixelType> void VectorRendererAA<PixelType>:: drawInteriorRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType color, VectorRenderer::FillMode fill_m) { + // Do not draw empty space rounded squares. + if (w <= 0 || h <= 0) { + return; + } + int x, y; const int pitch = Base::_activeSurface->pitch / Base::_activeSurface->format.bytesPerPixel; int px, py; |