Fixup canvas background drawing again

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.
This commit is contained in:
Charles Dang 2016-03-15 21:31:08 +11:00
parent 30bd1c1324
commit fe4623e152

View file

@ -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,