DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2108 Version: 1.3-current After all discussions and looking at test/line_style.cxx I came to the conclusion that we would better adjust the docs to the current behavior than try to enforce what the docs say. There are several reasons why I came to this conclusion: (1) The existing demo program shows the behavior of drawing lines in an fl_rect() and fl_vertex(), and both honor the fl_line_style() settings. Neither the former authors (developers) nor any users observed that this behavior was wrong (according to the docs). (2) If we would change the _behavior_, we would probably break many existing programs. (3) It seems to be logical and consistent that fl_rect() honors the line style, because it is one of many simple line drawing functions like fl_line(), fl_polygon(), fl_xyline(), and fl_loop(). And even the "complex" drawing functions fl_begin_line(), fl_vertex() et al.,..., fl_end_line() obviously support line styles. Thus my suggestion: The docs should state that fl_rect() honors line style settings like all the other line drawing functions. This implies that "1-pixel border" and "inside" in the current docs is wrong (or at least misleading) and should be changed. WRT alignment of multiple pixel wide lines: The OS-specific functions seem to do it similar (at least I could test it under Windows and Linux: odd pixel widths are centered, even pixel width are "off by 0.5 pixels to the top and left side" for horizontal and vertical lines, resp.. The docs should state that this is normal, but also "undefined" behavior, because it is not guaranteed on all platforms (on MacOS line drawing can obviously be anti-aliased). For drawing multiple pixel wide lines _inside_ a given box, I suggest that we add something like an (optional) alignment (or clipping) argument to fl_rect() so that we can adjust the drawing offset accordingly to draw *the_full_line* inside the given box. For other drawing functions, fl_push/pop_clip() can make sure that the drawing is inside a given area. Link: http://www.fltk.org/str.php?L2108 Version: 1.3-current _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
