summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-02-09 16:59:34 +0000
committerManolo Gouy <Manolo>2018-02-09 16:59:34 +0000
commit6f5340d430aa0a1a13dc7ce527424a9c50c1382d (patch)
treeaa3ce606b7d66f25ae5fb307646e772ba3a61f20 /src
parent52ae3582a2c7bb437df33c0a30bfd5a01d6c5282 (diff)
Windows: fix fl_overlay_rect() when scaling factor value is > 2
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12656 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver.H1
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx7
2 files changed, 7 insertions, 1 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.H b/src/drivers/GDI/Fl_GDI_Graphics_Driver.H
index 1ab61722b..5bfd9b515 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.H
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.H
@@ -147,6 +147,7 @@ protected:
virtual const char *font_name(int num);
virtual void font_name(int num, const char *name);
void global_gc();
+ virtual void overlay_rect(int x, int y, int w , int h);
};
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx
index 0dbb674f0..40ba82472 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx
@@ -43,6 +43,12 @@ void Fl_GDI_Graphics_Driver::point_unscaled(float fx, float fy) {
FillRect(gc_, &rect, fl_brush());
}
+void Fl_GDI_Graphics_Driver::overlay_rect(int x, int y, int w , int h) {
+ // make pen have a one-pixel width
+ line_style_unscaled( (color()==FL_WHITE?FL_SOLID:FL_DOT), 1, NULL);
+ loop(x, y, x+w-1, y, x+w-1, y+h-1, x, y+h-1);
+}
+
void Fl_GDI_Graphics_Driver::rect_unscaled(float x, float y, float w, float h) {
if (w<=0 || h<=0) return;
int line_delta_ = (scale_ > 1.75 ? 1 : 0);//TMP
@@ -248,7 +254,6 @@ void Fl_GDI_Graphics_Driver::restore_clip() {
}
}
-
//
// End of "$Id$".
//