diff options
Diffstat (limited to 'src/Fl_Graphics_Driver.cxx')
| -rw-r--r-- | src/Fl_Graphics_Driver.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index 5af14a2c2..50889bccf 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -751,10 +751,11 @@ Fl_Scalable_Graphics_Driver::Fl_Scalable_Graphics_Driver() : Fl_Graphics_Driver( void Fl_Scalable_Graphics_Driver::rect(int x, int y, int w, int h) { if (w > 0 && h > 0) { - int s = (int)scale()/2; - rect_unscaled(this->floor(x) + s, this->floor(y) + s, - this->floor(x + w - 1) - this->floor(x), - this->floor(y + h - 1) - this->floor(y)); + int s = (int)scale(); + int d = s / 2; + rect_unscaled(this->floor(x) + d, this->floor(y) + d, + this->floor(x + w) - this->floor(x) - s, + this->floor(y + h) - this->floor(y) - s); } } |
