Skip to content

Commit

Permalink
Fixup canvas background drawing again
Browse files Browse the repository at this point in the history
When fixing it up the previous time, I didn't include border size, meaning
rectangles with both borders and fill_color drew over the borders.
  • Loading branch information
Vultraz committed Mar 15, 2016
1 parent 30bd1c1 commit fe4623e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/auxiliary/canvas.cpp
Expand Up @@ -808,7 +808,11 @@ void trectangle::draw(surface& canvas,

if(fill_color_) {

sdl::draw_solid_tinted_rectangle(x, y, w, h,
sdl::draw_solid_tinted_rectangle(
(x + border_thickness_),
(y + border_thickness_),
(w - (border_thickness_ * 2)),
(h - (border_thickness_ * 2)),
(fill_color_ & 0xFF000000) >> 24,
(fill_color_ & 0x00FF0000) >> 16,
(fill_color_ & 0x0000FF00) >> 8,
Expand Down

0 comments on commit fe4623e

Please sign in to comment.