From edaff1bdeaddac9e86417bbc4121f3e7bee1e983 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 21 Feb 2016 14:41:29 +0100 Subject: GRAPHICS: Skip empty rects in VectorRenderer*'s drawInteriorRoundedSquareAlg. --- graphics/VectorRendererSpec.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'graphics/VectorRendererSpec.cpp') 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 void VectorRendererSpec:: 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 void VectorRendererAA:: 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; -- cgit v1.2.3