summaryrefslogtreecommitdiff
path: root/src/drivers/GDI
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/GDI')
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver.h1
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx11
2 files changed, 12 insertions, 0 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.h b/src/drivers/GDI/Fl_GDI_Graphics_Driver.h
index 1e8ff72d7..06e040f1a 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.h
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.h
@@ -69,6 +69,7 @@ protected:
// --- implementation is in src/fl_rect.cxx which includes src/cfg_gfx/gdi_rect.cxx
void point(int x, int y);
void rect(int x, int y, int w, int h);
+ void focus_rect(int x, int y, int w, int h);
void rectf(int x, int y, int w, int h);
void line(int x, int y, int x1, int y1);
void line(int x, int y, int x1, int y1, int x2, int y2);
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx
index 553d7c043..796896cdd 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx
@@ -48,6 +48,17 @@ void Fl_GDI_Graphics_Driver::rect(int x, int y, int w, int h) {
LineTo(fl_gc, x, y);
}
+void Fl_GDI_Graphics_Driver::focus_rect(int x, int y, int w, int h) {
+ // Windows 95/98/ME do not implement the dotted line style, so draw
+ // every other pixel around the focus area...
+ w--; h--;
+ int i=1, xx, yy;
+ for (xx = 0; xx < w; xx++, i++) if (i & 1) point(x + xx, y);
+ for (yy = 0; yy < h; yy++, i++) if (i & 1) point(x + w, y + yy);
+ for (xx = w; xx > 0; xx--, i++) if (i & 1) point(x + xx, y + h);
+ for (yy = h; yy > 0; yy--, i++) if (i & 1) point(x, y + yy);
+}
+
void Fl_GDI_Graphics_Driver::rectf(int x, int y, int w, int h) {
if (w<=0 || h<=0) return;
RECT rect;