gdk_draw_line() draws lines by passing the coordinates to XDrawLine(),
which in turn casts the coordinates to "signed int" as it formats them for
the X Protocol. Thus, large coordinate values wrap around and cause odd
visual artifacts.
This fixes the problem by only calling gdk_draw_line() with coordinate
values that should actually be visible.