diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-02-01 01:59:13 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-02-01 01:59:13 +0000 |
| commit | 0e4b539ae376dc13ade9b6960647fb881d755b36 (patch) | |
| tree | 09cb9ff0ea2f1dd99b4fb18769bf0d21405e551f | |
| parent | 4c53a5d8f4f23358a101ef6bda4b6b8ea4b95274 (diff) | |
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
| -rw-r--r-- | src/fl_rect.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
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 $". // |
