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
This commit is contained in:
Michael R Sweet
1999-02-01 01:59:13 +00:00
parent 4c53a5d8f4
commit 0e4b539ae3
+8 -2
View File
@@ -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 $".
//