summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2003-01-14 23:48:01 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2003-01-14 23:48:01 +0000
commit717aa7ec8f0a0768b617def0d8dcb68069d255c4 (patch)
tree9389a61eb11926f217551dd0903a03af2d400a44
parent9f67d66c3a7ad5fde387ecf1eb7c15d772c8e003 (diff)
Fix line/polygon drawing bug when the number of unique vertices is too
small. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2906 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES7
-rw-r--r--src/fl_vertex.cxx16
2 files changed, 19 insertions, 4 deletions
diff --git a/CHANGES b/CHANGES
index 64746ba2b..5fe6c1f93 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,8 +1,11 @@
CHANGES IN FLTK 1.1.3
- Documentation updates.
- - The size_range() values were not honored under MacOS X.
- [SF Bug #647074]
+ - Lines with less than 2 unique vertices and polygons
+ with less the 3 unique vertices were not drawn
+ properly. [SF Bug #647067]
+ - The size_range() values were not honored under MacOS
+ X. [SF Bug #647074]
- OpenGL windows didn't resize correctly on MacOS X.
[SF Bug #667855]
- The menus incorrectly used the overlay visual when one
diff --git a/src/fl_vertex.cxx b/src/fl_vertex.cxx
index 68f90f3dc..6130520d8 100644
--- a/src/fl_vertex.cxx
+++ b/src/fl_vertex.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_vertex.cxx,v 1.5.2.3.2.5 2002/01/01 15:11:32 easysw Exp $"
+// "$Id: fl_vertex.cxx,v 1.5.2.3.2.6 2003/01/14 23:48:01 easysw Exp $"
//
// Portable drawing routines for the Fast Light Tool Kit (FLTK).
//
@@ -131,6 +131,10 @@ void fl_end_points() {
}
void fl_end_line() {
+ if (n < 2) {
+ fl_end_points();
+ return;
+ }
#ifdef WIN32
if (n>1) Polyline(fl_gc, p, n);
#elif defined(__APPLE__)
@@ -154,6 +158,10 @@ void fl_end_loop() {
void fl_end_polygon() {
fixloop();
+ if (n < 3) {
+ fl_end_line();
+ return;
+ }
#ifdef WIN32
if (n>2) {
SelectObject(fl_gc, fl_brush());
@@ -201,6 +209,10 @@ void fl_gap() {
void fl_end_complex_polygon() {
fl_gap();
+ if (n < 3) {
+ fl_end_line();
+ return;
+ }
#ifdef WIN32
if (n>2) {
SelectObject(fl_gc, fl_brush());
@@ -248,5 +260,5 @@ void fl_circle(double x, double y,double r) {
}
//
-// End of "$Id: fl_vertex.cxx,v 1.5.2.3.2.5 2002/01/01 15:11:32 easysw Exp $".
+// End of "$Id: fl_vertex.cxx,v 1.5.2.3.2.6 2003/01/14 23:48:01 easysw Exp $".
//