projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd6237d
)
Fixed radius calculation for rounded rectangles
author
Ingo Ruhnke
<grumbel@gmail.com>
Wed, 30 Jul 2014 16:58:52 +0000
(18:58 +0200)
committer
Ingo Ruhnke
<grumbel@gmail.com>
Wed, 30 Jul 2014 16:58:52 +0000
(18:58 +0200)
src/video/sdl/sdl_renderer.cpp
patch
|
blob
|
history
diff --git
a/src/video/sdl/sdl_renderer.cpp
b/src/video/sdl/sdl_renderer.cpp
index
38cd046
..
21951d6
100644
(file)
--- a/
src/video/sdl/sdl_renderer.cpp
+++ b/
src/video/sdl/sdl_renderer.cpp
@@
-503,7
+503,8
@@
SDLRenderer::draw_filled_rect(const DrawingRequest& request)
Uint8 b = static_cast<Uint8>(fillrectrequest->color.blue * 255);
Uint8 a = static_cast<Uint8>(fillrectrequest->color.alpha * 255);
- int radius = std::min(rect.h / 2, static_cast<int>(fillrectrequest->radius));
+ int radius = std::min(std::min(rect.h / 2, rect.w / 2),
+ static_cast<int>(fillrectrequest->radius));
if (radius)
{