From 0e4b539ae376dc13ade9b6960647fb881d755b36 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 1 Feb 1999 01:59:13 +0000 Subject: Fixed fl_line() bugs in for WIN32 - the documentation says that the LineTo() function will draw up to but not including the end point. "It's a feature!" git-svn-id: file:///fltk/svn/fltk/trunk@260 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_rect.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx index a2154c711..03fa68967 100644 --- a/src/fl_rect.cxx +++ b/src/fl_rect.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_rect.cxx,v 1.8 1999/01/07 19:17:41 mike Exp $" +// "$Id: fl_rect.cxx,v 1.9 1999/02/01 01:59:13 mike Exp $" // // Rectangle drawing routines for the Fast Light Tool Kit (FLTK). // @@ -136,6 +136,9 @@ void fl_line(int x, int y, int x1, int y1) { #ifdef WIN32 MoveToEx(fl_gc, x, y, 0L); LineTo(fl_gc, x1, y1); + // Draw the last point *again* because the GDI line drawing + // functions will not draw the last point ("it's a feature!"...) + LineTo(fl_gc, x1, y1); #else XDrawLine(fl_display, fl_window, fl_gc, x, y, x1, y1); #endif @@ -146,6 +149,9 @@ void fl_line(int x, int y, int x1, int y1, int x2, int y2) { MoveToEx(fl_gc, x, y, 0L); LineTo(fl_gc, x1, y1); LineTo(fl_gc, x2, y2); + // Draw the last point *again* because the GDI line drawing + // functions will not draw the last point ("it's a feature!"...) + LineTo(fl_gc, x2, y2); #else XPoint p[3]; p[0].x = x; p[0].y = y; @@ -373,5 +379,5 @@ int fl_clip_box(int x, int y, int w, int h, int& X, int& Y, int& W, int& H){ } // -// End of "$Id: fl_rect.cxx,v 1.8 1999/01/07 19:17:41 mike Exp $". +// End of "$Id: fl_rect.cxx,v 1.9 1999/02/01 01:59:13 mike Exp $". // -- cgit v1.2.3